DCOR-dev / DCOR-Aid

GUI for managing data on DCOR
https://dcor.mpl.mpg.de
GNU General Public License v3.0
1 stars 2 forks source link

Confusing error message during upload with cli #73

Closed B-Hartmann closed 1 year ago

B-Hartmann commented 1 year ago

dcor-aid 0.12.8

I tried uploading data to DCOR using the dcor-aid cli and it seems that the check sum of the uploaded file on the server and the local file were different, resulting in an error. The error message, see below, shows ValueError: See message above! which is very confusing, because I have to (I guess) go above the printed traceback to see details.

After encountering a transfer error already and trying again, there is still some issue, but I have no clue what the first error was because the cli output was not very verbose. The local file seems to be fine, I can open and check it with DCKit - no issues.

Compressing uncompressed resources.
Uploading resources.
Encountered a transfer error. Retrying 1...
Initializing.
Dataset ID is 13eb4513-1787-43eb-abb4-876edf5a5XXX.
Compressing uncompressed resources.
Uploading resources.
100% (file 1/1)
Verifying upload.
Job <dcoraid.upload.job.UploadJob object at 0x000001E54F76C0D0> encountered an error:
SHA256 sum failed for resources:
'M001_data.rtdc' (acab2fcd5b6c145987e3f433461d6873dde290c97864259f596a86b4ba39a537 vs. 5391bb11116051f29374ef921da9f619d47f9640cd93e7fe5eacbc4c46968e76)!
Traceback (most recent call last):
  File "C:\Users\labadmin\Documents\long_covid_project\venv\lib\site-packages\dcoraid\cli.py", line 132, in upload_task
    raise e
  File "C:\Users\labadmin\Documents\long_covid_project\venv\lib\site-packages\dcoraid\cli.py", line 121, in upload_task
    ascertain_state_or_bust(uj, "done")
  File "C:\Users\labadmin\Documents\long_covid_project\venv\lib\site-packages\dcoraid\cli.py", line 44, in ascertain_state_or_bust
    raise ValueError("See message above!")
ValueError: See message above!
paulmueller commented 1 year ago

The SHA256 sum failed for resources error indicates that something went wrong during the upload and the file uploaded is not anymore the same file you have locally. You should retry the upload in this case. If this won't work, we should discuss this in a private chat/meeting.

I will make the error message less twisted.