Giter Club home page Giter Club logo

lambertfit's People

Contributors

bengebre avatar

Stargazers

 avatar

Watchers

 avatar

lambertfit's Issues

Lambertfit example raises OSError: Could not find a suitable TLS CA certificate bundle, invalid path: <null>

In running the Lambertfit example

#!/Users/user/opt/anaconda3/bin/python3

import numpy as np
import lambertfit as lf
from astroquery.jplhorizons import Horizons
from astropy.time import Time

#define observer location and body to observe
loc = 'G96' #MPC observatory location code (eg. 'G96' or '500@0')
body_id = '2000002' #small body designation (e.g. '2000002' == Pallas)

#how many (simulated) observations do we want and at what time
tstart = 2459000.5 #julian start date
dt = 14 #number of days of observations
nobs = 30 #number of observations

#observation times
times = np.linspace(tstart,tstart+dt,nobs) #julian date observation times
tdbs = Time(times,format='jd').tdb.value #barycenter dynamical times for the observations

#get simulated observation data from Horizons
ephs = Horizons(id=body_id,location=loc,epochs=times,id_type='designation').ephemerides()
radecs = np.array([[eph['RA'],eph['DEC']] for eph in ephs]) #RA and DEC in degrees

#sun->observer position vector at observation times
r_so = lf.sun_observer(loc,tdbs)

#LambertFit OD solution for RA/DEC observations
rvm_sb, rvn_sb, fit_rms = lf.fit(radecs,times,r_so)

The following traceback and error message occurs

Traceback (most recent call last):
  File "/Users/user/Various_Python_Examples/LambertFit_Ex-1.py", line 22, in <module>
    ephs = Horizons(id=body_id,location=loc,epochs=times,id_type='designation').ephemerides()
  File "/Users/user/opt/anaconda3/lib/python3.9/site-packages/astroquery/utils/class_or_instance.py", line 25, in f
    return self.fn(obj, *args, **kwds)
  File "/Users/user/opt/anaconda3/lib/python3.9/site-packages/astroquery/utils/process_asyncs.py", line 26, in newmethod
    response = getattr(self, async_method_name)(*args, **kwargs)
  File "/Users/user/opt/anaconda3/lib/python3.9/site-packages/astroquery/jplhorizons/core.py", line 595, in ephemerides_async
    response = self._request('GET', URL, params=request_payload,
  File "/Users/user/opt/anaconda3/lib/python3.9/site-packages/astroquery/query.py", line 317, in _request
    response = query.request(self._session,
  File "/Users/user/opt/anaconda3/lib/python3.9/site-packages/astroquery/query.py", line 71, in request
    return session.request(self.method, self.url, params=self.params,
  File "/Users/user/opt/anaconda3/lib/python3.9/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/user/opt/anaconda3/lib/python3.9/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/user/opt/anaconda3/lib/python3.9/site-packages/requests/adapters.py", line 458, in send
    self.cert_verify(conn, request.url, verify, cert)
  File "/Users/user/opt/anaconda3/lib/python3.9/site-packages/requests/adapters.py", line 261, in cert_verify
    raise OSError(
OSError: Could not find a suitable TLS CA certificate bundle, invalid path: <null>

I'm running the Anaconda Distribution of Python version 3.9.18 on a Mac Pro(2019) running Mac OSX Sonoma version 14.2.1.

Please advise.

Sam Dupree.

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.