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

dependency compatibility #166

Open
henrykironde opened this issue Nov 7, 2023 · 5 comments
Open

dependency compatibility #166

henrykironde opened this issue Nov 7, 2023 · 5 comments
Assignees

Comments

@henrykironde
Copy link
Contributor

Current workflow errors

Traceback (most recent call last):
  File "/blue/ewhite/henrysenyondo/conda/envs/EvergladesTools/bin/mapbox", line 5, in <module>
    from mapboxcli.scripts.cli import main_group
  File "/blue/ewhite/henrysenyondo/conda/envs/EvergladesTools/lib/python3.11/site-packages/mapboxcli/scripts/cli.py", line 14, in <module>
    from mapboxcli.scripts import (
  File "/blue/ewhite/henrysenyondo/conda/envs/EvergladesTools/lib/python3.11/site-packages/mapboxcli/scripts/geocoding.py", line 7, in <module>
    import mapbox
  File "/blue/ewhite/henrysenyondo/conda/envs/EvergladesTools/lib/python3.11/site-packages/mapbox/__init__.py", line 11, in <module>
    from .services.static import Static
  File "/blue/ewhite/henrysenyondo/conda/envs/EvergladesTools/lib/python3.11/site-packages/mapbox/services/static.py", line 7, in <module>
    from mapbox.utils import normalize_geojson_featurecollection
  File "/blue/ewhite/henrysenyondo/conda/envs/EvergladesTools/lib/python3.11/site-packages/mapbox/utils.py", line 1, in <module>
    from collections import Mapping, Sequence
ImportError: cannot import name 'Mapping' from 'collections' (/blue/ewhite/henrysenyondo/conda/envs/EvergladesTools/lib/python3.11/collections/__init__.py)
Usage: rio mbtiles [OPTIONS] INPUT [OUTPUT]
Try 'rio mbtiles --help' for help.

Error: No such option: --progress-bar Did you mean --rgba?
Usage: rio mbtiles [OPTIONS] INPUT [OUTPUT]
Try 'rio mbtiles --help' for help.

Error: No such option: --progress-bar Did you mean --rgba?

Two current errors:

  1. Some of the packages import, from collections import Mapping, Sequence the python version has collections in import collections.abc
  2. rio mbtiles doesn't recognize the --progress-bar
@ethanwhite
Copy link
Member

We tracked this down to mapboxcli, which appears unmaintained and uses an old version of the collections module structure. The solution is the rewrite upload() in upload_mapbox.py to use the API directly instead of relying on mapboxcli.

@ethanwhite
Copy link
Member

Original code from mapboxcli is here: https://github.com/mapbox/mapbox-cli-py/blob/master/mapboxcli/scripts/uploads.py

@ethanwhite
Copy link
Member

ethanwhite commented Nov 27, 2023

@ethanwhite
Copy link
Member

Looks like step 0 is just adding awscli to the pip section of environment.yml.

@henrykironde - Would you like a PR or do you want to take care of that addition as part of a bigger PR?

@henrykironde
Copy link
Contributor Author

I will do that

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

2 participants