olivierhagolle / Sentinel-download

Automated download of Sentinel-2 L1C data from ESA (through wget) :http://olivierhagolle.github.io/Sentinel-download
GNU General Public License v2.0
189 stars 113 forks source link

'os' is not defined - windows machine #40

Open cdhasselerharm opened 5 years ago

cdhasselerharm commented 5 years ago

Anyone had this problem? import os is at the start of the script so no idea why it's not defined....

python Sentinel_download.py --lat 43.6 --lon 1.44 --downloader aria2 -a apihub.txt -o 51 -s S2

Traceback (most recent call last): File "Sentinel_download.py", line 178, in

prepare wget command line to search catalog

NameError: name 'os' is not defined

olivierhagolle commented 5 years ago

Sorry Chris, I am not able to reproduce this error on linux, trying the same command line. I hope you will manage to find out what is wrong. Olivier

syulianto commented 3 years ago

Sorry for being late to reply, but who knows help others. the same thing happened to me. What I did was move the "import os" instruction right above the "if len (sys.argv) == 1:" instruction and the problem was resolved.