roboflow / roboflow-100-benchmark

Code for replicating Roboflow 100 benchmark results and programmatically downloading benchmark datasets
https://www.rf100.org
MIT License
244 stars 23 forks source link

error in downloading one of the datasets using Docker -- requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0) #27

Closed monajalal closed 1 year ago

monajalal commented 1 year ago

When I ran your Docker for downloading the datasets I got this error for one of the datasets. Have you tested your Docker on Ubuntu 18.04 and Python 3.8? Here's my machine specs. Please let me know if you have a suggestion or fix in your docker.

$ lsb_release -a
LSB Version:    core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.6 LTS
Release:    18.04
Codename:   bionic

$ python
Python 3.8.8 (default, Apr 13 2021, 19:58:26) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.

>>> import json
>>> json.__version__
'2.0.9'
Downloading Dataset Version Zip in /workspace/rf100/marbles to coco: 100% [5453523 / 5453523] bytes
Extracting Dataset Version Zip to /workspace/rf100/marbles in coco:: 100%|█████████████████████████████████████████████████████████████████████████████████████████████| 113/113 [00:00<00:00, 7572.52it/s]
Done!
Matplotlib created a temporary config/cache directory at /tmp/matplotlib-1adwzlk_ because the default path (/.config/matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing.
Storing cavity-rs0uf in /workspace/rf100/cavity-rs0uf for coco
loading Roboflow workspace...
loading Roboflow project...
Downloading Dataset Version Zip in /workspace/rf100/cavity-rs0uf to coco: 100% [16421966 / 16421966] bytes
Extracting Dataset Version Zip to /workspace/rf100/cavity-rs0uf in coco:: 100%|████████████████████████████████████████████████████████████████████████████████████████| 426/426 [00:00<00:00, 8409.45it/s]
Done!
Matplotlib created a temporary config/cache directory at /tmp/matplotlib-zbo31cql because the default path (/.config/matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing.
Storing pests-2xlvx in /workspace/rf100/pests-2xlvx for coco
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/workspace/scripts/download_dataset.py", line 66, in <module>
    main()
  File "/workspace/scripts/download_dataset.py", line 57, in main
    rf = Roboflow(api_key=api_key)
  File "/usr/local/lib/python3.8/site-packages/roboflow/__init__.py", line 66, in __init__
    self.auth()
  File "/usr/local/lib/python3.8/site-packages/roboflow/__init__.py", line 69, in auth
    r = check_key(self.api_key, self.model_format, self.notebook)
  File "/usr/local/lib/python3.8/site-packages/roboflow/__init__.py", line 29, in check_key
    r = response.json()
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Jacobsolawetz commented 1 year ago

@monajalal thank you for surfacing this - we have replicated and are working on a fix!

Jacobsolawetz commented 1 year ago

@monajalal we have pushed additional protection too prevent this bug from stopping download - please make sure you rebuild your docker with the most recent roboflow python package.

Jacobsolawetz commented 1 year ago

@FrancescoSaverioZuppichini is rebuilding and repushing the one we are hosting on Docker Hub 🚀