1modm / petereport

PeTeReport is an open-source application vulnerability reporting tool.
https://1modm.github.io/petereport/
BSD 3-Clause "New" or "Revised" License
465 stars 129 forks source link

RuntimeError: populate() isn't reentrant #23

Closed NaveenNguyen closed 2 years ago

NaveenNguyen commented 2 years ago

what is this issue? I have been trying to resolve it for a long time. image

1modm commented 2 years ago

Hi @NaveenNguyen, I never seen this, it could be and error due to SELinux, OS restriction or missing file.

Could you run $ python manage.py check to see if there is any error?

Also, do you follow the installation steps? maybe is a dependency issue: https://1modm.github.io/petereport/django/

NaveenNguyen commented 2 years ago

Hi, Thank you for your comments. I solved this issue based on this solution: https://stackoverflow.com/questions/27093746/django-stops-working-with-runtimeerror-populate-isnt-reentrant.

currently, I am facing the following error message while executing this command $ python manage.py check:

image

1modm commented 2 years ago

@NaveenNguyen it seems an issue with the sqlite db path. Which django or python version do you have? I recommend to run the environment with pipenv as specified in https://1modm.github.io/petereport/django/:

Install

  1. Clone the project and cd into PeTeReport: cd petereport/
  2. Create a new virtual environment and installing dependencies: pipenv install
  3. Run the virtual environment: pipenv shell
  4. Go to Django PeTeReport App: cd app/
  5. Create the database: python manage.py migrate
  6. Make the latest database changes: python manage.py makemigrations
  7. Super user admin/P3t3r3p0rt will be created, but you can create a new super user: python manage.py createsuperuser
  8. Populate the CWE data python manage.py loaddata config/cwe-list.json

Start the server

  1. Run the virtual environment: pipenv shell
  2. Go to Django PeTeReport App: cd app/
  3. Start the django server: python manage.py runserver --insecure or python manage.py runserver 0.0.0.0:8000 --insecure
  4. Go to http://127.0.0.1:8000/
  5. Login with any of users created admin/P3t3r3p0rt (administrator) and viewer/v13w3r (viewer) or the user credentials configured in the configuration file
  6. Try harder
  7. Create a report
  8. Close up and stop the server: Ctrl + C