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

TypeError: expected str, bytes or os.PathLike object, not NoneType #81

Open
gkb999 opened this issue Apr 23, 2021 · 3 comments
Open

TypeError: expected str, bytes or os.PathLike object, not NoneType #81

gkb999 opened this issue Apr 23, 2021 · 3 comments

Comments

@gkb999
Copy link

gkb999 commented Apr 23, 2021

image

Above is my input.
I made sure my source file is of EW-GRDM-1SDH (can be seen in the attached image/screenshot). I do not see any other requirements as per the README file but I still get this error below.
Any suggestions about mistaken attempt would be appreciated
Below is the error for refrence
image

@akorosov @aleksandervines @xdenisx

  • [ ]
@gkb999 gkb999 changed the title 'Source file must be Sentinel-1A/1B ' TypeError: expected str, bytes or os.PathLike object, not NoneType Apr 24, 2021
@xdenisx
Copy link
Contributor

xdenisx commented Jun 8, 2021

image

Above is my input.
I made sure my source file is of EW-GRDM-1SDH (can be seen in the attached image/screenshot). I do not see any other requirements as per the README file but I still get this error below.
Any suggestions about mistaken attempt would be appreciated
Below is the error for refrence
image

@akorosov @aleksandervines @xdenisx

  • [ ]

Have you solved the issue? I guess you should try double slashes ('//') in the file path instead of single

@gkb999
Copy link
Author

gkb999 commented Jun 10, 2021

Thanks a ton for responding.
But I either get Type Error as mentioned earlier and after replacing single slashes to double, it returns a "ValueError: Source file must be Sentinel-1A/1B IW_GRDH_1SDH, IW_GRDH_1SDV, EW_GRDM_1SDH, or EW_GRDM_1SDV product"

I'm pretty sure my input is of Sentinel-1A/1B EW_GRDM_1SDH (the inputs required or
Error2
Error1

would be accepted)
It would be great to see this sorted.
@xdenisx

@snthzm
Copy link

snthzm commented Jan 18, 2022

I faced the same problem and solved it the following way.

First, the error : "ValueError : Source file must be Sentinel-1A ...." seems to be linked to the path of the zip file, by setting the path using '/' instead of '', as @xdenisx suggested, corrected it and lead us to the second type of error, the "TypeError : expected str,...".

This error was with this line in the sentinel1image.py file:

self.aux_data_dir = os.path.join(os.environ.get('XDG_DATA_HOME', os.environ.get('HOME')),'.s1denoise')

This line return a None because the environment variable name is not adapted for windows. What I understand after few research (cf. https://stackoverflow.com/questions/43853548/xdg-basedir-directories-for-windows) is that XDG_DATA_HOME is a Unix environment variable and for Windows, I guess you are using Windows, the equivalent variable is LOCALAPPDATA.

So by changing the above line by the following one, the problem is fixed for me:

self.aux_data_dir = os.path.join(os.environ.get('LOCALAPPDATA', os.environ.get('HOME')),'.s1denoise')

Hope it will help.

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

3 participants