Giter Site home page Giter Site logo

pynasa's People

Contributors

bmtgoncalves avatar dependabot[bot] avatar poppingtonic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pynasa's Issues

resources.json not included in pypi package

These lines don't seem to correctly package resources.json. I had to wget it directly into my virtualenv's site-packages/pyNASA folder after getting this error:
(Using Python 3.5)

In [2]: nasa = pyNASA()                                                                                                                                                                  [65/804]
WARNING:root:Requests made without an app_token will be subject to strict throttling limits.                                                                                                     
---------------------------------------------------------------------------                                                                                                                      
FileNotFoundError                         Traceback (most recent call last)                                                                                                                      
<ipython-input-2-4515acee3e8d> in <module>()                                                                                                                                                     
----> 1 nasa = pyNASA()                                                                                                                                                                          
                                                                                                                                                                                                 
/home/fubar/.envs/nasa/lib/python3.5/site-packages/pyNASA/__init__.py in __init__(self, token, secret)                                                                                             
     10                 self.client = Socrata("data.nasa.gov", token)                                                                                                                            
     11                                                                                                                                                                                          
---> 12                 data = pkg_resources.resource_string(__name__, "resources.json")                                                                                                         
     13                 resources = json.loads(data.decode())                                                                                                                                    
     14                                                                                                                                                                                          
                                                                                                                                                                                                 
/home/fubar/.envs/nasa/lib/python3.5/site-packages/pkg_resources/__init__.py in resource_string(self, package_or_requirement, resource_name)                                                       
   1213         """Return specified resource as a string"""                                                                                                                                      
   1214         return get_provider(package_or_requirement).get_resource_string(                                                                                                                 
-> 1215             self, resource_name                                                                                                                                                          
   1216         )                                                                                                                                                                                
   1217                                                                                                                                                                                          
                                                                                                                                                                                                 
/home/fubar/.envs/nasa/lib/python3.5/site-packages/pkg_resources/__init__.py in get_resource_string(self, manager, resource_name)                                                                  
   1455                                                                                                                                                                                          
   1456     def get_resource_string(self, manager, resource_name):                                                                                                                               
-> 1457         return self._get(self._fn(self.module_path, resource_name))                                                                                                                      
   1458                                                                                                                                                                                          
   1459     def has_resource(self, resource_name):                                                                                                                                               
                                                                                                                                                                                                 
/home/fubar/.envs/nasa/lib/python3.5/site-packages/pkg_resources/__init__.py in _get(self, path)                                                                                                   
   1575                                                                                                                                                                                          
   1576     def _get(self, path):                                                                                                                                                                
-> 1577         with open(path, 'rb') as stream:                                                                                                                                                 
   1578             return stream.read()                                                                                                                                                         
   1579                                                                                                                                                                                          
                                                                                                                                                                                                 
FileNotFoundError: [Errno 2] No such file or directory: '/home/fubar/.envs/nasa/lib/python3.5/site-packages/pyNASA/resources.json'                                                                 
                                                                                                                                               

Cannot Instantiate pyNASA object

Running the following code results in the subsequent error.

>>> from pyNASA import pyNASA
>>> nasa = pyNASA()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-2-4515acee3e8d> in <module>()
----> 1 nasa = pyNASA()

/Users/foo/anaconda2/lib/python2.7/site-packages/pyNASA/__init__.py in __init__(self, token, secret)
     14 
     15                 for dataset in resources:
---> 16                         pyNASA._add_resource_(**dataset)
     17 
     18         def _add_resource_(id, name, description):

TypeError: unbound method _add_resource_() must be called with pyNASA instance as first argument (got nothing instead)

Class pyNASA has no attribute 'outgassing'

Running the basic case here https://bmtgoncalves.github.io/pyNASA/ shows the following error. I already moved resources.json to the pyNASA folder

Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 26 2016, 12:10:39)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

`from pyNASA import pyNASA
nasa = pyNASA
data = nasa.outgassing()

Traceback (most recent call last):
File "", line 1, in
AttributeError: class pyNASA has no attribute 'outgassing'`

Initializing the class as 'PyNASA()' shows a 'not defined' error:

Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 26 2016, 12:10:39)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

from pyNASA import pyNASA
nasa = PyNASA()

Traceback (most recent call last):
File "", line 1, in
NameError: name 'PyNASA' is not defined`

pyNASA - FileNotFoundError

nasa = pyNASA()


FileNotFoundError Traceback (most recent call last)
in ()
----> 1 nasa = pyNASA()

c:\users\harkirat\appdata\local\programs\python\python36\lib\site-packages\pyNASA_init_.py in init(self, token, secret)
10 self.client = Socrata("data.nasa.gov", token)
11
---> 12 data = pkg_resources.resource_string(name, "resources.json")
13 resources = json.loads(data.decode())
14

c:\users\harkirat\appdata\local\programs\python\python36\lib\site-packages\pkg_resources_init_.py in resource_string(self, package_or_requirement, resource_name)
1147 """Return specified resource as a string"""
1148 return get_provider(package_or_requirement).get_resource_string(
-> 1149 self, resource_name
1150 )
1151

c:\users\harkirat\appdata\local\programs\python\python36\lib\site-packages\pkg_resources_init_.py in get_resource_string(self, manager, resource_name)
1391
1392 def get_resource_string(self, manager, resource_name):
-> 1393 return self._get(self._fn(self.module_path, resource_name))
1394
1395 def has_resource(self, resource_name):

c:\users\harkirat\appdata\local\programs\python\python36\lib\site-packages\pkg_resources_init_.py in _get(self, path)
1514
1515 def _get(self, path):
-> 1516 with open(path, 'rb') as stream:
1517 return stream.read()
1518

FileNotFoundError: [Errno 2] No such file or directory: 'c:\users\harkirat\appdata\local\programs\python\python36\lib\site-packages\pyNASA\resources.json'

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.