You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The test_data data uses the requests library but it is not listed as a required dependency. If requests is not installed, stac crashes while loading plugins.
To reproduce
Steps to reproduce the behavior:
Create a fresh virtual environment and activate it. (e.g. python -m venv ./test_venv && source ./test_venv/bin/activate)
Use pip to install stactools without the [validate] option. (e.g. pip install stactools or pip install 'stactools[s3]'
Try to run stac. (e.g. stac --help)
stac throws a ModuleNotFoundError.
Expected behavior
I should be able to run stac --help.
Screenshots and shell session dumps
> ../venv/bin/stac --help
Traceback (most recent call last):
File "/home/mgordon/tmp/stactools/../venv/bin/stac", line 5, in <module>
from stactools.cli.cli import run_cli
File "/home/mgordon/tmp/venv/lib/python3.12/site-packages/stactools/cli/__init__.py", line 110, in <module>
registry.load_plugins()
File "/home/mgordon/tmp/venv/lib/python3.12/site-packages/stactools/cli/registry.py", line 43, in load_plugins
name: importlib.import_module(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mgordon/tmp/venv/lib/python3.12/site-packages/stactools/testing/__init__.py", line 4, in <module>
from .test_data import TestData
File "/home/mgordon/tmp/venv/lib/python3.12/site-packages/stactools/testing/test_data.py", line 9, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
The text was updated successfully, but these errors were encountered:
Describe the bug
The
test_data
data uses therequests
library but it is not listed as a required dependency. Ifrequests
is not installed,stac
crashes while loading plugins.To reproduce
Steps to reproduce the behavior:
python -m venv ./test_venv && source ./test_venv/bin/activate
)stactools
without the[validate]
option. (e.g.pip install stactools
orpip install 'stactools[s3]'
stac
. (e.g.stac --help
)stac
throws aModuleNotFoundError
.Expected behavior
I should be able to run
stac --help
.Screenshots and shell session dumps
The text was updated successfully, but these errors were encountered: