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

Xml encoding in xml_tools.py #89

Open
alceballosa opened this issue Apr 22, 2021 · 2 comments
Open

Xml encoding in xml_tools.py #89

alceballosa opened this issue Apr 22, 2021 · 2 comments

Comments

@alceballosa
Copy link

Hi,

I was recently testing MAJA in a Docker image (in Windows, via WSL2) prepared as per the tutorial here (using the installer): #80

My miniconda Python environment consists of the following libraries: https://pastebin.com/LkY2XLDX

Most steps went smoothly, but during the xml_tools.py "can be opened?" validation, the lxml library could not open the XML files in the .SAFE folders so MAJA couldn't detect any assets, so I kept getting the "No input L1 product available" exception.

I fixed this by adding encoding='utf-8' to all instances of the open function in xml_tools.py; however, I am not sure if this would introduce bugs on non-WSL+Docker environments (maybe Windows is introducing some unwanted line endings?)

Should I make a pull request nonetheless?

Kind regards.

@petket-5
Copy link

Hi,

Thank you for the analysis as well as the proposed solution. As of today, Maja under WSL is not officially supported but we added this to the internal todo-list. Anyhow, we would be happy to test the utf-8 fix using our CI attached to the gitlab. Could you open a MR for this under the following link please: https://gitlab.orfeo-toolbox.org/maja/maja

@jbrossar @Julien-Osman : Given the recent talks we had about the topic of contributions, are third party MRs like this eligible for CI testing?

Kind regards,
Peter

@alceballosa
Copy link
Author

Hi Peter!

Sorry for being late with this, the situation in my country (Colombia) has been delicate the last few weeks and I wasn't able to do the MR. In any case, just went ahead and did that so let me know if you are able to test the utf-8 fix.

Kindly,

Alberto.

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