1

I have an API in Python and when I run the unit tests I get these errors in the terminal of PyCharm:

File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\ext\testbed\__init__.py", line 132, in <module>
    from google.appengine.api.app_identity import app_identity_stub
File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\api\app_identity\app_identity_stub.py", line 44, in <module>
    from Crypto.PublicKey import RSA
File "c:\temp\easy_install-38xi7l\pycrypto-2.6.1-py2.7-win-amd64.egg.tmp\Crypto\PublicKey\RSA.py", line 78, in <module>
File "c:\temp\easy_install-38xi7l\pycrypto-2.6.1-py2.7-win-amd64.egg.tmp\Crypto\Random\__init__.py", line 28, in <module>
File "c:\temp\easy_install-38xi7l\pycrypto-2.6.1-py2.7-win-amd64.egg.tmp\Crypto\Random\OSRNG\__init__.py", line 34, in <module>
File "c:\temp\easy_install-38xi7l\pycrypto-2.6.1-py2.7-win-amd64.egg.tmp\Crypto\Random\OSRNG\nt.py", line 28, in <module>
File "c:\temp\easy_install-38xi7l\pycrypto-2.6.1-py2.7-win-amd64.egg.tmp\Crypto\Random\OSRNG\winrandom.py", line 7, in <module>
File "c:\temp\easy_install-38xi7l\pycrypto-2.6.1-py2.7-win-amd64.egg.tmp\Crypto\Random\OSRNG\winrandom.py", line 6, in __bootstrap__

UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 13: ordinal not in range(128)

There are no errors if it runs in Mac, only happens with Windows 10, I am using Python 2.7.

I would not like to modify it since the project is working well on PROD and in mac locally but I would like to make it work on my Windows machine.

gso_gabriel
  • 4,199
  • 1
  • 10
  • 22
  • take a loo at https://stackoverflow.com/a/9942822/5783608 – Adithya Sep 09 '20 at 07:44
  • Does this answer your question? [UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 20: ordinal not in range(128)](https://stackoverflow.com/questions/9942594/unicodeencodeerror-ascii-codec-cant-encode-character-u-xa0-in-position-20) – Dustin Ingram Sep 09 '20 at 16:17
  • since the error comes from other libraries I use and the project is working well except in Windows, no @DustinIngram – user2547656 Sep 09 '20 at 16:30
  • You should file an issue in the pycrypto issue tracker then: https://launchpad.net/pycrypto/+bugs – Dustin Ingram Sep 09 '20 at 17:05
  • @gso_gabriel Did you solve it? I have the same problem – user2547656 Sep 21 '21 at 00:20

0 Answers0