flaviostutz / sentinelloader

Sentinel-2 satellite tiles images downloader from Copernicus. Minimizes data download and combines multiple tiles to return a single area of interest.
MIT License
42 stars 18 forks source link

Import error when running docker #17

Open JuliaWasala opened 2 years ago

JuliaWasala commented 2 years ago

Hiya, I just set up to user your docker container because my kernel suddenly started dying when running getRegionHistory (yesterday it worked fine, I triggered the LTA retrieval, and today the files are shown to be online but the kernel dies during execution of getREgionHistory),

But when importing sentinelloader I get the following error:

Traceback (most recent call last):

  File "/usr/local/lib/python3.5/dist-packages/IPython/core/interactiveshell.py", line 3291, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)

  File "<ipython-input-1-9268305e3050>", line 4, in <module>
    from sentinelloader import Sentinel2Loader

  File "<frozen importlib._bootstrap>", line 969, in _find_and_load

  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked

  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked

  File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible

  File "/usr/local/lib/python3.5/dist-packages/sentinelloader-1.1.1-py3.5.egg/sentinelloader/__init__.py", line 1, in <module>
    from .sentinel2loader import Sentinel2Loader

  File "<frozen importlib._bootstrap>", line 969, in _find_and_load

  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked

  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked

  File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible

  File "/usr/local/lib/python3.5/dist-packages/sentinelloader-1.1.1-py3.5.egg/sentinelloader/sentinel2loader.py", line 1, in <module>
    from sentinelsat import SentinelAPI

  File "/usr/local/lib/python3.5/dist-packages/sentinelsat-1.1.0-py3.5.egg/sentinelsat/__init__.py", line 4, in <module>
    from . import sentinel

  File "/usr/local/lib/python3.5/dist-packages/sentinelsat-1.1.0-py3.5.egg/sentinelsat/sentinel.py", line 287
    self.logger.info(f"Found {count:,} products")
                                               ^
SyntaxError: invalid syntax
flaviostutz commented 2 years ago

Sorry, I didn’t get it. Are you using the same container or made some changes to it?

Syntax error maybe cause by using a different Python runtime or something (Python 2.7 vs 3.4, for example), but I am only guessing in the dark.

Check the dependencies on Dockerfile.

Sent from my iPhone

On 9 Feb 2022, at 10:55, Julia Wasala @.***> wrote:

 Hiya, I just set up to user your docker container because my kernel suddenly started dying when running getRegionHistory (yesterday it worked fine, I triggered the LTA retrieval, and today the files are shown to be online but the kernel dies during execution of getREgionHistory),

But when importing sentinelloader I get the following error:

Traceback (most recent call last):

File "/usr/local/lib/python3.5/dist-packages/IPython/core/interactiveshell.py", line 3291, in run_code exec(code_obj, self.user_global_ns, self.user_ns)

File "", line 4, in from sentinelloader import Sentinel2Loader

File "", line 969, in _find_and_load

File "", line 958, in _find_and_load_unlocked

File "", line 664, in _load_unlocked

File "", line 634, in _load_backward_compatible

File "/usr/local/lib/python3.5/dist-packages/sentinelloader-1.1.1-py3.5.egg/sentinelloader/init.py", line 1, in from .sentinel2loader import Sentinel2Loader

File "", line 969, in _find_and_load

File "", line 958, in _find_and_load_unlocked

File "", line 664, in _load_unlocked

File "", line 634, in _load_backward_compatible

File "/usr/local/lib/python3.5/dist-packages/sentinelloader-1.1.1-py3.5.egg/sentinelloader/sentinel2loader.py", line 1, in from sentinelsat import SentinelAPI

File "/usr/local/lib/python3.5/dist-packages/sentinelsat-1.1.0-py3.5.egg/sentinelsat/init.py", line 4, in from . import sentinel

File "/usr/local/lib/python3.5/dist-packages/sentinelsat-1.1.0-py3.5.egg/sentinelsat/sentinel.py", line 287 self.logger.info(f"Found {count:,} products") ^ SyntaxError: invalid syntax — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

JuliaWasala commented 2 years ago

I'm using the same container, I set it up following the instructions in the readme.

I did get my own environment working in the end, but the docker container still isn't. I don't need the docker anymore, but I thought you would like to know if it wasn't working!