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

ERROR using SNAP 10 #83

Open
anikaweinmann opened this issue May 28, 2024 · 10 comments
Open

ERROR using SNAP 10 #83

anikaweinmann opened this issue May 28, 2024 · 10 comments

Comments

@anikaweinmann
Copy link
Member

When trying to update to SNAP 10 (see mundialis/esa-snap#41), the following error occurred:

i.sentinel1.pyrosargeocode -fndm input=/grassdb/....SAFE.zip output_directory=/grassdb/tmp_s1/out aoi=/grassdb/tmp_s1/aoi.geojson elevation=dem temporary_directory=/grassdb/tmp_s1/tmp/ polarizations=VV auxillary_data=layoverShadowMask nprocs=1 --v

Start geocoding scene
....SAFE.zip
ERROR: Geocoding failed with the following error: cannot read version
       information from /root/.snap/system/var/log/messages.log.
       Please restart SNAP.
       Please check the log files

In the log file the version is listed as:

  Product Version         = SNAP (Build 11.3-6b879cb782eaa4f13a731aff82eada11289a66f7)
  Operating System        = Linux version 5.15.0-83-generic running on amd64
  Java; VM; Vendor        = 11.0.23; OpenJDK 64-Bit Server VM 11.0.23+9-alpine-r0; Alpine
  Runtime                 = OpenJDK Runtime Environment 11.0.23+9-alpine-r0
  Java Home               = /usr/lib/jvm/java-11-openjdk
  System Locale; Encoding = en_gb (snap); UTF-8
  Home Directory          = /root
  Current Directory       = /
  User Directory          = /root/.snap/system
  Cache Directory         = /root/.snap/system/var/cache
  Installation            = /usr/local/snap/snap
                            /usr/local/snap/platform
                            /usr/local/snap/etc
                            /usr/local/snap/ide
                            /usr/local/snap/microwavetbx
                            /usr/local/snap/rstb
                            /usr/local/snap/smos
                            /usr/local/snap/platform

The installed pyroSAR version is too old (0.24.0), but alpine 3.18 does not install the new version (0.26.0). Only pyronSAR>=0.26.0 ist compatibe with SNAP 10.

For the new SNAP version openjdk11 has to be installed to change here.

@neteler
Copy link
Member

neteler commented May 28, 2024

Does @ninsbl perhaps have a suggestion here?

@ninsbl
Copy link
Contributor

ninsbl commented Jun 21, 2024

Hmm. We have not moved to SNAP 10 yet, and we actually use actinia-ubuntu because our workflows require pytorch which we could not get working in alpine...
So I do not have any suggestions here, sorry... Will come back to you when we move to SNAP 10 on Ubuntu...

(BTW: Ubuntu builds are much faster and the size advantage of alpine is almost gone once heavy packages like pytorch and torchvision are installed...).

@ninsbl
Copy link
Contributor

ninsbl commented Jul 23, 2024

Is that still an issue?

I am about to move to SNAP 10 on UBUNTU as well.
However, I tried to install pyrosar>=0.26 in Alpine 3.18 and it seems to work fine in this test-docker-file:

FROM alpine:3.18 as version
RUN apk add python3 py3-pip postgresql-dev gcc python3-dev musl-dev
RUN python3 -m pip install --break-system-packages pyrosar>=0.26

@anikaweinmann
Copy link
Member Author

Yes it is still an issue. We have not tried it again. We are using now alpine:3.20 as base for actinia.
Thank you then we will try if it works also on Alpine 3.20.

@ninsbl
Copy link
Contributor

ninsbl commented Jul 23, 2024

FROM alpine:3.20 as version
RUN apk add python3 py3-pip postgresql-dev gcc python3-dev musl-dev
RUN python3 -m pip install --break-system-packages pyrosar>=0.26

seems to work fine as well...

@mmacata
Copy link
Member

mmacata commented Dec 17, 2024

Indeed the pyrosar version with above commands would still have pyrosar 0.24.0 installed without notice or warning!
Reason most likely is the required python version defined here requires-python = ">=3.8,<3.11" and alpine having python 3.12 already.
The following command does the trick:

pip install --ignore-requires-python pyroSAR

@johntruckenbrodt
Copy link

Hi. I am the maintainer of pyroSAR. Unfortunately I had to place an upper limit on the Python version in johntruckenbrodt/pyroSAR#293. From version 0.25.0 on, pyroSAR does have this limit. I did not however fix all previous versions. I understand this is inconvenient. If python>=3.11 is used, an older version of pyroSAR is installed and users don't see what's happening.
A solution for the problem with sqlalchemy_utils seems to have been found. I just have not found the time to check whether it's working for pyroSAR. I try to do this soon.
When ignoring the python constraint during installation, the database functionality will not work. If this is not needed, this might be a possible workaround.

@neteler
Copy link
Member

neteler commented Dec 18, 2024

Thanks for you feedback, @johntruckenbrodt!
Seems that this Python limitation only affects Windows users (at least, what I understand from kvesteri/sqlalchemy-utils#716 (comment))?

@johntruckenbrodt
Copy link

johntruckenbrodt commented Dec 18, 2024

@neteler I just opened a new PR to test it in the Ubuntu CI/CD pipeline:
johntruckenbrodt/pyroSAR#328
Works well. So yes, it seems to only affect Windows users.
I will leave the PR open and set up a Windows CI/CD pipeline as soon as possible. I used to have one on Appveyor but it was a mess. Haven't gotten around setting it up on GitHub Actions yet.

@johntruckenbrodt
Copy link

The newly released version 0.27.0 should fix it.

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

5 participants