l3uddz / plex_autoscan

Script to assist sonarr/radarr with plex imports. Will only scan the folder that has been imported, instead of the whole library section.
GNU General Public License v3.0
397 stars 70 forks source link

ImportError: cannot import name 'escape' from 'jinja2' #177

Closed xxtensazenxx closed 2 years ago

xxtensazenxx commented 2 years ago

I was running the program fine, and ended it (maybe improperly - CTRL+C) Then I rescaned my plex files manually. Then I went to run it again and now it will not run properly.

Steps to reproduce the behavior: Attempting to run the program ~/scan.py server --loglevel=INFO outputs the following

Traceback (most recent call last):
  File "/mnt/mpathn/shiftgaming/plex_autoscan/scan.py", line 19, in <module>
    from flask import Flask
  File "/home/shiftgaming/.local/lib/python3.9/site-packages/flask/__init__.py", line 14, in <module>
    from jinja2 import escape
ImportError: cannot import name 'escape' from 'jinja2' (/usr/lib/python3.9/site-packages/jinja2/__init__.py)

When running the command I expect the program to execute.

Screenshots If applicable, add screenshots to help explain your problem.

Logs Link to debug or trace log files.

You can enable debug mode by adding --loglevel=DEBUG to the server command (e.g. systemd).

If this is a Google Drive monitoring issue, enable SHOW_CACHE_LOGS for detailed logs.

System Information

saltydk commented 2 years ago

Use venv so you aren't relying on system pip packages. Something probably bumped the jinja2 version.

xxtensazenxx commented 2 years ago

I deleted all the files and kept my config, moved a fresh batch of the master onto it. I then re-did the requirements.txt and everything and it works again ! !