profile
viewpoint

Ask questionsJSON files not found on import

This package seems broken. Steps to reproduce:

$ which python3
/usr/local/bin/python3
$ python3 -m venv ~/.venv/safteydb
$ source ~/.venv/safteydb/bin/activate
$ pip install safety-db
$ python                                                                                                                                                                                                                                                                                                                             
>>> from safety_db import INSECURE, INSECURE_FULL
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/cladam/.venv/safteydb/lib/python3.7/site-packages/safety_db/__init__.py", line 13, in <module>
    with open("data/insecure.json") as __f:
FileNotFoundError: [Errno 2] No such file or directory: 'data/insecure.json'
pyupio/safety-db

Answer questions bac

The files are included, they just aren't referenced properly. I installed safety-db into a virtualenv and the files are at:

./venv/lib/python3.6/site-packages/safety_db/insecure_full.json.

The code expects them in a data directly below your current working directory.

useful!

Related questions

No questions were found.
source:https://uonfu.com/
Github User Rank List