skip to Main Content

I’m using:

  1. MacOS Catalina, version 10.15 (19A603).
  2. python 3.7.4
  3. pip3

Running and Debugging the following Python code within venv:

import jose
print(jose)
from jose import jwt
token = jwt.encode({'key': 'value'}, 'secret', algorithm='HS256')
print(token)

results with the following error:

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

the specific line is: from jose import jwt.

How can I get more information towards solving that problem.

My pip freeze of venv:

Active-Alchemy==1.0.0
alembic==1.2.1
aniso8601==8.0.0
anyjson==0.3.3
appnope==0.1.0
arrow==0.15.2
asn1crypto==0.24.0
attrdict==2.0.0
attrs==19.3.0
auth0-python==3.1.2
backcall==0.1.0
bcrypt==3.1.7
beautifulsoup4==4.8.1
bleach==3.1.0
boto3==1.10.2
botocore==1.13.2
cachetools==3.1.1
certifi==2019.9.11
cffi==1.11.5
chardet==3.0.4
Click==7.0
configparser==4.0.2
crypto==1.4.1
cryptography==2.4.2
cssselect==1.1.0
cytoolz==0.9.0.1
decorator==4.3.0
defusedxml==0.6.0
django-dotenv==1.4.2
dnspython==1.16.0
docutils==0.15.2
EasyProcess==0.2.7
ecdsa==0.13
emoji==0.4.5
entrypoints==0.3
eth-abi==1.2.2
eth-account==0.3.0
eth-hash==0.2.0
eth-keyfile==0.5.1
eth-keys==0.2.0b3
eth-rlp==0.1.2
eth-typing==1.3.0
eth-utils==1.2.2
eventlet==0.25.1
facebook-sdk==2.0.0
feedparser==5.2.1
Flask==1.1.1
flask-restplus==0.13.0
Flask-SQLAlchemy==2.4.1
forex-python==1.5
future==0.16.0
gevent==1.4.0
google-api-python-client==1.6.3
google-auth==1.6.3
google-auth-httplib2==0.0.3
greenlet==0.4.15
gunicorn==19.9.0
hexbytes==0.1.0
httplib2==0.10.3
idna==2.5
importlib-metadata==0.23
inflection==0.3.1
ipykernel==5.1.3
ipython==7.8.0
ipython-genutils==0.2.0
ipywidgets==7.5.1
iso3166==0.8
iso8601==0.1.12
itsdangerous==1.1.0
jedi==0.15.1
Jinja2==2.10.3
jmespath==0.9.4
joblib==0.14.0
jsonpickle==0.9.5
jsonrpclib==0.1.7
jsonschema==3.1.1
jupyter-client==5.3.4
jupyter-core==4.6.1
logstash-formatter==0.5.17
lru-dict==1.1.6
lxml==4.4.1
Mako==1.0.7
MarkupSafe==1.0
mistune==0.8.4
monotonic==1.5
more-itertools==7.2.0
mysqlclient==1.4.4
Naked==0.1.31
nbconvert==5.6.1
nbformat==4.4.0
nltk==3.4.5
notebook==6.0.1
numpy==1.17.3
oauth2client==4.1.2
orderedset==2.0.1
Paginator==0.5.1
pandas==0.25.2
pandocfilters==1.4.2
parsimonious==0.8.1
parso==0.5.1
passlib==1.7.1
pexpect==4.7.0
pg8000==1.10.2
pickleshare==0.7.5
prometheus-client==0.7.1
prompt-toolkit==2.0.10
psycopg2==2.7.3
psycopg2-binary==2.8.4
ptyprocess==0.6.0
py==1.7.0
py4j==0.10.8.1
pyasn1==0.3.3
pyasn1-modules==0.1.1
pycountry==19.8.18
pycparser==2.19
pycryptodome==3.7.0
Pygments==2.4.2
PyJWT==1.6.1
PyMySQL==0.6.6
Pyro4==4.77
pyrsistent==0.15.4
pyscreenshot==0.5.1
python-dateutil==2.6.1
python-editor==1.0.3
python-jose==3.0.1
python-logstash==0.4.6
pytz==2017.2
PyVirtualDisplay==0.2.4
PyYAML==3.13
pyzmq==18.1.0
qgrid==1.1.1
redis==3.3.11
requests==2.22.0
requests-file==1.4.2
retry==0.9.2
retrying==1.3.3
rlp==1.0.3
rq==1.1.0
rsa==4.0
s3transfer==0.2.1
scrypt==0.8.6
Send2Trash==1.5.0
sentry-sdk==0.13.0
serpent==1.28
shellescape==3.4.1
simplejson==3.11.1
six==1.12.0
snowplow-analytics-sdk==0.2.3
soupsieve==1.9.4
SQLAlchemy==1.2.14
SQLAlchemy-Utils==0.34.2
sqlitedict==1.6.0
statsd==3.3.0
terminado==0.8.2
testpath==0.4.2
textblob==0.15.3
tldextract==2.1.0
toolz==0.9.0
tornado==6.0.3
tqdm==4.36.1
traitlets==4.3.3
uritemplate==3.0.0
urllib3==1.21.1
wcwidth==0.1.7
web3==4.8.1
webencodings==0.5.1
websockets==6.0
Werkzeug==0.16.0
widgetsnbextension==3.5.1
zipp==0.6.0

HOW DID I SOLVED IT:

Wrote a script that installed dependencies one by one, then, execute the Python code to catch what dep leads to failure.

Discovered it starts to throw after asn1crpto installed.

Tried to install only asn1cyrpto and jose -> Python code executed successfully.

Then, re-run the script that installs deps one by one with jose and asn1crypto already installed, found out that after cryptography dep installed it starting to throw again

So searched for (cryptography + asn1crypto) related issues.

Found a suggestion to update asn1crypto 0.24.0 -> 1.0.0

Issue solved.

4

Answers


  1. I would try wrapping the offending line in a try/except block, and logging the exception.

    Login or Signup to reply.
  2. I was having similar problem when using pyjwt, Even using pyjwt -v will fail with SIGABRT. Try upgrading cryptography version (from cryptography==2.4.2) to version listed below, it fixed problem for me.

    "cryptography": {
        "version": "2.8"
     }
    
    Login or Signup to reply.
  3. Same problem, and aky08 was right. Upgrade cryptography to 2.8 solve it.

    Login or Signup to reply.
  4. The module faulthandler dump Python tracebacks explicitly, on a signal :

    python -X faulthandler test.py
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search