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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

xxtensazenxx opened this issue · comments

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

  • Plex Autoscan Version: Master
  • Operating System: 5.15.26-gentoo-whatbox
commented

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

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 ! !