Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cryptographic error
#1
Hi all

when i am using the import statement "from OpenSSL import crypto",i am getting an error like "cannot import certificate transperency".how should i resolve this issue.
Reply
#2
if on windows, run:
python -m pip install --upgrade pip
else on Linux, run:
pip install --upgrade pip
and reinstall package
Reply
#3
(Jun-23-2018, 11:04 AM)Larz60+ Wrote: if on windows, run:
 python -m pip install --upgrade pip 
else on Linux, run:
 pip install --upgrade pip 
and reinstall package
i have tried this doesnt seem to solve the problem
and what do you mean by reinstall package
thank you

(Jun-23-2018, 05:46 PM)saisankalpj Wrote:
(Jun-23-2018, 11:04 AM)Larz60+ Wrote: if on windows, run:
 python -m pip install --upgrade pip 
else on Linux, run:
 pip install --upgrade pip 
and reinstall package
i have tried this doesnt seem to solve the problem and what do you mean by reinstall package thank you
i am already using pip 10.00

this the error i am getting
tge application ran well before

File "/usr/lib/python2.7/site-packages/cryptography/x509/__init__.py", line 7, in <module>
from cryptography.x509 import certificate_transparency
ImportError: cannot import name certificate_transparency
Reply
#4
there are some dependencies, see: https://cryptography.io/en/latest/develo...ht=example
and then see: https://cryptography.io/en/latest/x509/c...ansparency
Reply
#5
@Lars60+ excellent links. Please note that OP is using Linux and Python 2.7.

There have been numerous cases where ImportError: cannot import name certificate_transparency have been reported, and may have been a bug at one time. An additional fix included updating pip, Python, and all packages to the latest versions, before installing cryptography.

I was able to run the following code (after installing cryptography from PYPI pip install cryptography successfully on Windows 10 using Python 2.7.13 and Python 3.6.5:
from cryptography.x509 import certificate_transparency

print("done")
Lewis
To paraphrase: 'Throw out your dead' code. https://www.youtube.com/watch?v=grbSQ6O6kbs Forward to 1:00
Reply
#6
(Jun-24-2018, 10:02 AM)ljmetzger Wrote: @Lars60+ excellent links. Please note that OP is using Linux and Python 2.7. There have been numerous cases where ImportError: cannot import name certificate_transparency have been reported, and may have been a bug at one time. An additional fix included updating pip, Python, and all packages to the latest versions, before installing cryptography. I was able to run the following code (after installing cryptography from PYPI pip install cryptography successfully on Windows 10 using Python 2.7.13 and Python 3.6.5:
from cryptography.x509 import certificate_transparency print("done")
Lewis
iam getting the cryptographic error when i write the statement"from OpenSSL import crypto".the application was working fine before.could you help me
thank you
Reply
#7
Since the application was working before, you seem to have some kind of configuration problem. Please note that the PYPI version of pyopenssl was updated to 18.0 on May 16, 2008. Again using Python 2.7 and Windows 10 I successfully ran the following code:
from OpenSSL import crypto
from cryptography.x509 import certificate_transparency

print("done")
This might not help much since you are on a Linux system.

You might want to consider giving your copy of Python 2.7 the Death Penalty, and reinstall Python 2.7 and all packages you need.

Lewis
To paraphrase: 'Throw out your dead' code. https://www.youtube.com/watch?v=grbSQ6O6kbs Forward to 1:00
Reply
#8
(Jun-25-2018, 12:55 PM)ljmetzger Wrote: Since the application was working before, you seem to have some kind of configuration problem. Please note that the PYPI version of pyopenssl was updated to 18.0 on May 16, 2008. Again using Python 2.7 and Windows 10 I successfully ran the following code:
from OpenSSL import crypto from cryptography.x509 import certificate_transparency print("done")
This might not help much since you are on a Linux system. You might want to consider giving your copy of Python 2.7 the Death Penalty, and reinstall Python 2.7 and all packages you need. Lewis
thanks i have resolved the issue by just installing "cffi" in the command prompt
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Non cryptographic hashes AndrzejB 3 814 Mar-21-2023, 07:36 PM
Last Post: AndrzejB

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020