Giter Club home page Giter Club logo

modis-python-suite's People

Contributors

gabriel-desharnais avatar timstevens1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

modis-python-suite's Issues

connection error

Salut Gabriel,

Nous avons encore des problèmes de connection avec NSIDC, leur serveur est down donc nous devons juste attendre, par contre cela force le programme à s'arrêter même lorsque qu'on demande un téléchargement des images MOD09 uniquement, sur le site de la NASA (URL2="https://e4ftl01.cr.usgs.gov") qui lui fonctionne, il y -t-il moyen de découpler les deux ?

Merci!
Véronique

Issue running script

Hi, I tested the following code

import modisSuite
#Create object
print ("start..")
prod="MOD35_L2"
username="XXX"
password="XXX"
startdate="2010-02-20"
d=1 #Download days
tiles=['h13v04']
folder="/" #will download all file in the folder test
doo=modisSuite.downloader(prod,username,password,date=startdate,delta=d,tuiles=tiles,output=folder)
for day in doo.telechargerTout():
  print([aFile.name for aFile in day.files])
  day.mosaic()

and I get the following error on every try

Traceback (most recent call last):
  File "Desktop/modisSuite_test.py", line 15, in <module>
    for day in doo.telechargerTout():
  File "/anaconda3/lib/python3.6/site-packages/modisSuite/Downloader.py", line 218, in telechargerTout
    for date in LListeDate:
UnboundLocalError: local variable 'LListeDate' referenced before assignment

I already tested my credentials and they work fine, also no connection problems on my end.
would this be a problem on the lib or on my end?

Unable to download from NSIDC

I wrote this script to download snow data from the NSIDC:

import modisSuite

username = ""
password = ""
product = "MOD10A2.006"
tiles = ["h20v02"]
start_date = "2011-01-01"
d = 20
folder = "../test_data"

doo = modisSuite.downloader(product, username, password, date=start_date, delta=d, tuiles=tiles, output=folder)
for x, y in doo.telechargerTout():
    print(x, y)

I then recieved this error:

/usr/bin/python2.7 /home/tim/Documents/Research/arctic-browning/scripts/snow.py
Traceback (most recent call last):
  File "/home/tim/Documents/Research/arctic-browning/scripts/snow.py", line 11, in <module>
    doo = modisSuite.downloader(product, username, password, date=start_date, delta=d, tuiles=tiles, output=folder)
  File "build/bdist.linux-x86_64/egg/modisSuite/Downloader.py", line 41, in __init__
  File "build/bdist.linux-x86_64/egg/modisSuite/Downloader.py", line 139, in authentification
  File "build/bdist.linux-x86_64/egg/modisSuite/Downloader.py", line 138, in authentificationNSIDC
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 480, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 454, in request
    prep = self.prepare_request(req)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 388, in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
  File "/usr/lib/python2.7/dist-packages/requests/models.py", line 293, in prepare
    self.prepare_url(url, params)
  File "/usr/lib/python2.7/dist-packages/requests/models.py", line 353, in prepare_url
    raise MissingSchema(error)
requests.exceptions.MissingSchema: Invalid URL '>\n<!--[if lt IE 7]><html class=': No schema supplied. Perhaps you meant http://>
<!--[if lt IE 7]><html class=?

Process finished with exit code 1

Has anyone experienced this issue before?

error with url dowload adress

Salut Gabriel!

Je ne vois pas de changement avec les url sur les sites de download de NSDIC ou USGS qui fonctionnent dans un navigateur, mais le pg Downloader.py plante avec l'erreur suivante...

une idée?
Véronique

telechargeur=disSuite.downloader(nomProduit,UTILISATEUR,MOTPASSE,date۴eATraiter[0],delta=n(dateATraiter)-1,tuiles=ILES,output=p_temp,ignore=steDejaFait).telechargerTout() #,log=g,ignore=steDejaFait
File "/usr/local/lib/python2.7/dist-packages/modisSuite/Downloader.py", line 40, in init
self.authentification(self.session)
File "/usr/local/lib/python2.7/dist-packages/modisSuite/Downloader.py", line 154, in authentification
authentificationNSIDC()
File "/usr/local/lib/python2.7/dist-packages/modisSuite/Downloader.py", line 150, in authentificationNSIDC
session.get(h.text[a:b])
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 521, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 494, in request
prep =lf.prepare_request(req)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 437, in prepare_request
hooks=rge_hooks(request.hooks, self.hooks),
File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 305, in prepare
self.prepare_url(url, params)
File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 379, in prepare_url
raise MissingSchema(error)
requests.exceptions.MissingSchema: Invalid URL '>\n<!--[if lt IE 7]><html class= No schema supplied. Perhaps you meant http://>

Connexion USGS

Hello,
Maintenant que le site de NSIDC est revenu il y a un autre problème avec la connexion USGS:
File "/usr/local/lib/python2.7/dist-packages/modisSuite/Downloader.py", line 40, in init
self.authentification(self.session)
File "/usr/local/lib/python2.7/dist-packages/modisSuite/Downloader.py", line 157, in authentification
authentificationUSGS()
File "/usr/local/lib/python2.7/dist-packages/modisSuite/Downloader.py", line 126, in authentificationUSGS
h=ssion.get(h.headers["Location"],auth=elf.utilisateur,self.motdepasse),allow_redirectsúlse)
File "/usr/local/lib/python2.7/dist-packages/requests/structures.py", line 54, in getitem
return self._store[key.lower()][1]
KeyError: 'location'

est-ce que c'est parce que la ligne précédente (125 dans DOWNLOADER.py) fait référence à un fichier qui n'existe plus?
h=session.get("https://e4ftl01.cr.usgs.gov/MOLT/MOD09A1.005/2000.02.18/MOD09A1.A2000049.h00v08.005.2006268222532.hdf",auth=(self.utilisateur,self.motdepasse),allow_redirects=False)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.