Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geozones file not available (link broken) #197

Open
jeanpommier opened this issue Aug 20, 2020 · 2 comments
Open

geozones file not available (link broken) #197

jeanpommier opened this issue Aug 20, 2020 · 2 comments

Comments

@jeanpommier
Copy link

Hi,
when running docker-compose run --rm udata init as documented on https://github.com/opendatateam/docker-udata/blob/master/samples/simple/README.md, answering yes to import some spatial zones (countries) resultst in an error. I suppose the URL has changed and would need some update

Downloading GeoZones bundle: https://github.com/etalab/geozones/releases/download/2019.0/geozones-countries-2019-0-msgpack.tar.xz
Traceback (most recent call last):
  File "/usr/local/bin/udata", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/udata/commands/__init__.py", line 248, in main
    return super(UdataGroup, self).main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 569, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 419, in decorator
    return __ctx.invoke(f, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/udata/commands/init.py", line 40, in init
    ctx.invoke(spatial_load)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 419, in decorator
    return __ctx.invoke(f, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/udata/core/spatial/commands.py", line 144, in load
    filename, _ = urlretrieve(filename, tmp.path(GEOZONE_FILENAME))
  File "/usr/local/lib/python3.7/urllib/request.py", line 257, in urlretrieve
    tfp = open(filename, 'wb')
FileNotFoundError: [Errno 2] No such file or directory: '/udata/fs/tmp/geozones.tar.xz'
@mdamien
Copy link

mdamien commented Nov 5, 2020

Solved it by creating a /udata/fs/tmp directory

@streino
Copy link
Contributor

streino commented Sep 5, 2023

Hit the same issue.

The issue title is incorrect. The geozones file is available. The issue is caused by "init" writing to a non-existing path.

If the proposed udata PR won't be merged, another solution is to create the /udata/fs/tmp directory in the Dockerfile at https://github.com/opendatateam/docker-udata/blob/master/Dockerfile#L33C17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants