Git Product home page Git Product logo

Comments (11)

AndrewAnnex avatar AndrewAnnex commented on June 20, 2024

Hey Richard, thanks for writing in.

So first of all if I am correct, this issue is related to the recent SSL cert upgrade on the JPL servers (it was in january I think) and that the python you are using is using an old OpenSSL version which can't work with the newer cert.

There is at least one other user with the same error but they have not written back to me yet on the success of my half-remembered fix, so I will check on that. That fix is installing/upgrading pyopenssl and trying again. You may also need to install a new version of OpenSSL first using something like MacPorts or Homebrew. But since you are using canopy I am not exactly sure what other steps may be involved. I can find some relevant links for you, but I would just be googling 'python upgrade openssl'.

The alternative is to clone or download the release and then download the correct version of spice and extract it to a folder called cspice within the repository folder and then you can install by running python setup.py install

EDIT: see note below about upgrading openssl

from spiceypy.

AndrewAnnex avatar AndrewAnnex commented on June 20, 2024

To be clear, this is not a spiceypy specific issue, but an environment issue (albeit likely a common one)

from spiceypy.

RichardGFrench avatar RichardGFrench commented on June 20, 2024

from spiceypy.

RichardGFrench avatar RichardGFrench commented on June 20, 2024

from spiceypy.

AndrewAnnex avatar AndrewAnnex commented on June 20, 2024

Sorry the pyopenssl was not the thing I remembered it to be.
The issue again is that you are running python with an old OpenSSL that cannot validate the TLS 1.2 JPL certificate, for you and to anyone else with this issue you can check this by running

python -c "import ssl; print ssl.OPENSSL_VERSION" 

or

python3 -c "import ssl; print(ssl.OPENSSL_VERSION)" 

if using python 3.

If the version is older than something from late 2016 you need to upgrade that.
This is ultimately the correct way to fix the issue, and it is fairly mac specific as ubuntu versions newer than 14.04 I think come with newer openssl installations and I have not seen any issues on the windows side of things.

Secondly neither of those directories would work for a manual spiceypy install.
If you clone spiceypy to a folder say ~/spiceypy, with no further nesting so that the readme for example is located directly within ie ~/spiceypy/README.rst, you could then download cspice into that folder ie ~/spiceypy/cspice.

At that point you should be able to just run python setup.py install while within ~/spiceypy.

from spiceypy.

AndrewAnnex avatar AndrewAnnex commented on June 20, 2024

See this link for some info on upgrading OpenSSL
https://comeroutewithme.com/2016/03/13/python-osx-openssl-issue/

from spiceypy.

RichardGFrench avatar RichardGFrench commented on June 20, 2024

from spiceypy.

RichardGFrench avatar RichardGFrench commented on June 20, 2024

from spiceypy.

AndrewAnnex avatar AndrewAnnex commented on June 20, 2024

very odd. And you checked that python was using the new openssl version.

As I can't reproduce the error, would you be willing to modify the getspice.py file around line 148 to this:

 except urllib.error.URLError as err:
          print(err.reason)
          print(err)

and then running it?
The output may help me check a few things.

from spiceypy.

AndrewAnnex avatar AndrewAnnex commented on June 20, 2024

also as a curiosity, which version of macos are you running?

from spiceypy.

AndrewAnnex avatar AndrewAnnex commented on June 20, 2024

So I am closing this issue for now as it is a problem with the end user's environment. I will be adding mac os builds to the travis matrix soon which proves the point in #189 .

from spiceypy.

Related Issues (20)

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.