Downloaded xml's have unexpected tokens at top.
See original GitHub issueMy actions before raising this issue
- Read/searched the docs
- Searched past issues
Annotations have unexpected tokens at top when downloaded via api in CVAT XML 1.1 for videos
format. Downloading from UI has no issues.
Expected Behaviour
Downloaded annotations should not contain unexpected tokens.
Current Behaviour
Downloaded annotations have unexpected tokens at the top of the xml file.
Possible Solution
Steps to Reproduce (for bugs)
- Download a tasks annotations via rest api.
Context
Downloading a batch of annotations is practical via api, and useful in automating the process.
Your Environment
- CVAT alpha build 1.1.0
- OS : Centos 8
Next steps
You may join our Gitter channel for community support.
Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (9 by maintainers)
Top Results From Across the Web
Unexpected token <> in expression or statement - TechNet
I'm tryingt o edit the contents of a xml file and switch a value from true to false. <?xml version="1.0"?> <Categories xmlns="link">
Read more >c# - Download .xls file using Angular: Unexpected token P in ...
I have the following server method for returning an byte[] for an xls document stored in Azure Blob Storage .
Read more >Xml parser unexpected token error position:TEXT @1:2 in java ...
The problem is when I parse the XML from the original link for example (i am not posting the original link due to...
Read more >Unexpected Token Error when trying to add Index file - Reddit
Copy that address, paste it into additional content, try and download and get the error.
Read more >Unexpected token [$] in path expression - Oxygen XML Forum
Hi, I'm merging 2 XML files and get in some trouble. How can I do the following ? <!-- path to second XML:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello Katarina, I have found out that downloaded files are zip files. You can save it then unzip the file and save again. It is not the best solution though but you can use the following code if you like to directly dump to xml. You need the
zipfile
package. You should change the same named function of CLI class.Best Barış
response header content type appears as ‘application/zip’ , shouldn’t it be something different? I cannot encode the byte array to utf-8
UPDATE: Apparently this is because response is a zip file, everything is fine when I contents as a zip file. But in CLI page the example is with an xml file which was the case in previous ones. Check, https://github.com/opencv/cvat/blob/develop/utils/cli/README.md
From CLI, I would prefer unzipped versions or an option to choose if possible.