opendatateam / docker-udata

udata and plugins all-in-one Docker image
https://hub.docker.com/r/udata/udata/builds
MIT License
15 stars 12 forks source link

can't upload data (context is docker-compose "simple") #196

Closed jeanpommier closed 4 years ago

jeanpommier commented 4 years ago

Hi, I'm testing uData (and I must say I like what I can see of it), so I've started a docker-compose using the "simple" composition. Startup and init run fine, but I've met some errors : 1) during init, the geozones file (https://github.com/etalab/geozones/releases/download/2019.0/geozones-countries-2019-0-msgpack.tar.xz) could not be downloaded. But this is non-blocking error 2) more problematic is that I cannot upload any data: I've created a dataset, no problem, but when I want to add resources, all uploads fail with folling error stack:

[2020-08-11 12:36:33,780] ERROR in app: Exception on /api/1/datasets/5f329039924bf48afc5e53e7/upload/ [POST]
udata_1_3f75a0c5255d | Traceback (most recent call last):
udata_1_3f75a0c5255d |   File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1838, in full_dispatch_request
udata_1_3f75a0c5255d |     rv = self.dispatch_request()
udata_1_3f75a0c5255d |   File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1824, in dispatch_request
udata_1_3f75a0c5255d |     return self.view_functions[rule.endpoint](**req.view_args)
udata_1_3f75a0c5255d |   File "/usr/local/lib/python3.7/site-packages/flask_restplus/cors.py", line 38, in wrapped_function
udata_1_3f75a0c5255d |     resp = make_response(f(*args, **kwargs))
udata_1_3f75a0c5255d |   File "/usr/local/lib/python3.7/site-packages/udata/api/__init__.py", line 119, in wrapper
udata_1_3f75a0c5255d |     return func(*args, **kwargs)
udata_1_3f75a0c5255d |   File "/usr/local/lib/python3.7/site-packages/flask_restplus/api.py", line 325, in wrapper
udata_1_3f75a0c5255d |     resp = resource(*args, **kwargs)
udata_1_3f75a0c5255d |   File "/usr/local/lib/python3.7/site-packages/flask/views.py", line 88, in view
udata_1_3f75a0c5255d |     return self.dispatch_request(*args, **kwargs)
udata_1_3f75a0c5255d |   File "/usr/local/lib/python3.7/site-packages/flask_restplus/resource.py", line 44, in dispatch_request
udata_1_3f75a0c5255d |     resp = meth(*args, **kwargs)
udata_1_3f75a0c5255d |   File "/usr/local/lib/python3.7/site-packages/udata/api/__init__.py", line 110, in wrapper
udata_1_3f75a0c5255d |     return func(*args, **kwargs)
udata_1_3f75a0c5255d |   File "/usr/local/lib/python3.7/site-packages/flask_restplus/marshalling.py", line 243, in wrapper
udata_1_3f75a0c5255d |     resp = f(*args, **kwargs)
udata_1_3f75a0c5255d |   File "/usr/local/lib/python3.7/site-packages/udata/core/dataset/api.py", line 261, in post
udata_1_3f75a0c5255d |     infos = self.handle_upload(dataset)
udata_1_3f75a0c5255d |   File "/usr/local/lib/python3.7/site-packages/udata/core/dataset/api.py", line 241, in handle_upload
udata_1_3f75a0c5255d |     infos = handle_upload(storages.resources, prefix)
udata_1_3f75a0c5255d |   File "/usr/local/lib/python3.7/site-packages/udata/core/storages/api.py", line 138, in handle_upload
udata_1_3f75a0c5255d |     filename = combine_chunks(storage, args, prefix=prefix)
udata_1_3f75a0c5255d |   File "/usr/local/lib/python3.7/site-packages/udata/core/storages/api.py", line 123, in combine_chunks
udata_1_3f75a0c5255d |     out.write(chunks.read(partname))
udata_1_3f75a0c5255d |   File "/usr/local/lib/python3.7/site-packages/flask_fs/storage.py", line 228, in read
udata_1_3f75a0c5255d |     raise FileNotFound(filename)
udata_1_3f75a0c5255d | flask_fs.errors.FileNotFound: 741c6547-021e-4f13-b1b7-d8ee16b25d41/0

Any idea what's happening ?

abulte commented 4 years ago

Hi, do you have a custom udata.cfg? If you do can you paste its content?

jeanpommier commented 4 years ago

Hi, Nope, i didn't customize anything, simply followed the instructions on the README in samples/simple (and, fo course, ran it on smaples/simple folder)

abulte commented 4 years ago

Okay, I'll update some stuff and test on my end.

jeanpommier commented 4 years ago

thanks !

abulte commented 4 years ago

Hi,

So I updated quite a few things in our docker images.

I did not reproduce your issue but had trouble uploading files. I changed the shipped configuration and expanded the docs:

To be able to upload files, you will need to access the docker instance through an URL with a tld, i.e. localhost.local for example (set it in your /etc/hosts on your Unix machine).

It's now working fine for me (at least for uploading files).

Can you test w/ the new image version?

abulte commented 4 years ago

@quaxsze

jeanpommier commented 4 years ago

Hi @abulte Yes, this seems to be fixed, thank you !