Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TypeError: '>=' not supported between instances of 'NoneType' and 'str'

I have been able to install pycrypto as follows, followed the given answer.

enter image description here

But when I debug the project, then getting the following issue which seems to be related Crypto.

ModuleNotFoundError: No module named 'winrandom'

enter image description here

aut\token.py line 3 is

from jose.jwt import get_unverified_claims

UPDATE:1

Then, I have run pip install winrandom and get the following error.

TypeError: '>=' not supported between instances of 'NoneType' and 'str'

enter image description here

UPDATE:2

When I rung the proposed command pip install --proxy http://XXXX:80 git+https://github.com/dlitz/pycrypto.git with proxy(required) in the working environment, then I get a connection refused error as follows.

enter image description here

like image 928
casillas Avatar asked Aug 02 '17 23:08

casillas


2 Answers

It seems this is a common issue with pycrypto. This is a bug, but the project doesn't seem to be updated in the last couple years.

Digging over the issue, (https://github.com/andrewcooke/simple-crypt/issues/17) It seems the poblem is solved by doing an edit to the import statement in crypto\Random\OSRNG\nt.py:

import winrandom

to

from . import winrandom
like image 167
Chen A. Avatar answered Oct 18 '22 14:10

Chen A.


As Vinny mentioned, this issue is known and solved in Pycrypto, but PyPi still delivers an old release of Pycrytpto. You can instead install the latest release directly from the GitHub repository by using:

pip install git+https://github.com/dlitz/pycrypto.git
like image 44
AlexM Avatar answered Oct 18 '22 15:10

AlexM