Coder Social home page Coder Social logo

metadata_extract.py ... Unavailable Video ... SyntaxError: f-string: unterminated string [and "502 Bad Gateway" on RPi 4 & RPi 400] about calibre-web HOT 9 CLOSED

holta avatar holta commented on August 15, 2024
metadata_extract.py ... Unavailable Video ... SyntaxError: f-string: unterminated string [and "502 Bad Gateway" on RPi 4 & RPi 400]

from calibre-web.

Comments (9)

nzola avatar nzola commented on August 15, 2024 2

@holta @deldesir > Oh dear, https://dpaste.com/BLUAQSFKU#line-2448 shows:

FILE DOES NOT EXIST: /var/log/xklb.log

@nzola can you please run all 4 commands below — and show us the output with a photo or copy/paste?

lb --version
pipx list | grep xklb
yt-dlp --version
/root/.local/pipx/venvs/xklb/bin/yt-dlp --version
admin@Lokole11:~ $ sudo -i
root@Lokole11:~# lb --version
pipx list | grep xklb
2.8.063
   package xklb 2.8.63, installed using Python 3.11.2
root@Lokole11:~# yt-dlp --version
/root/.local/pipx/venvs/xklb/bin/yt-dlp --version
2024.05.27
2024.05.27
root@Lokole11:~#

from calibre-web.

nzola avatar nzola commented on August 15, 2024 1

New iiab install on pi4, Calibre-Web browser still produces error 502 Bad Gateway.
PUBLISHING TO URL... https://dpaste.com/BLUAQSFKU
image

from calibre-web.

holta avatar holta commented on August 15, 2024

Thank you @nzola:

  1. Logs appear very similar on both your RPi 4 installs.

  2. This should be a very high priority for @deldesir to try to understand and resolve in the coming week!

from calibre-web.

holta avatar holta commented on August 15, 2024

Oh dear, https://dpaste.com/BLUAQSFKU#line-2448 shows:

FILE DOES NOT EXIST: /var/log/xklb.log

@nzola can you please run all 4 commands below — and show us the output with a photo or copy/paste?

lb --version
pipx list | grep xklb
yt-dlp --version
/root/.local/pipx/venvs/xklb/bin/yt-dlp --version

from calibre-web.

holta avatar holta commented on August 15, 2024

@deldesir systemd service (calibre-web) says it's running, but its systemctl status at https://dpaste.com/BLUAQSFKU#line-2297 is extremely ugly again — definitely needing clean-up to remove SyntaxError: f-string: unterminated string : (Python 3.11 on Raspberry Pi OS 12 here)

COMMAND: /usr/bin/systemctl status calibre-web    # Is Calibre-Web running?

● calibre-web.service - Calibre-Web
     Loaded: loaded (/etc/systemd/system/calibre-web.service; enabled; preset: enabled)
     Active: active (running) since Sat 2024-06-15 00:38:35 PDT; 18min ago
   Main PID: 595 (python3)
      Tasks: 3 (limit: 3910)
        CPU: 7.657s
     CGroup: /system.slice/calibre-web.service
             └─595 /usr/local/calibre-web-py3/bin/python3 /usr/local/calibre-web-py3/cps.py -p /library/calibre-web/config/app.db

Jun 15 00:39:14 Lokole11 python3[595]:   File "/usr/local/calibre-web-py3/cps.py", line 51, in <module>
Jun 15 00:39:14 Lokole11 python3[595]:     main()
Jun 15 00:39:14 Lokole11 python3[595]:   File "/usr/local/calibre-web-py3/cps/main.py", line 37, in main
Jun 15 00:39:14 Lokole11 python3[595]:     from .editbooks import editbook
Jun 15 00:39:14 Lokole11 python3[595]:   File "/usr/local/calibre-web-py3/cps/editbooks.py", line 61, in <module>
Jun 15 00:39:14 Lokole11 python3[595]:     from .tasks.metadata_extract import TaskMetadataExtract
Jun 15 00:39:14 Lokole11 python3[595]:   File "/usr/local/calibre-web-py3/cps/tasks/metadata_extract.py", line 141
Jun 15 00:39:14 Lokole11 python3[595]:     self.message += f"<br><br>Unavailable Video(s):<br>{'<br>'.join(f'<a href="{url}" target="_blank">{url}</a>' for url in self.unavailable)}"
Jun 15 00:39:14 Lokole11 python3[595]:                                                                                ^
Jun 15 00:39:14 Lokole11 python3[595]: SyntaxError: f-string: unterminated string

from calibre-web.

deldesir avatar deldesir commented on August 15, 2024

Weird. The log says it's a syntax error, but the xklb and yt-dlp versions' freeze is another serious issue.

from calibre-web.

holta avatar holta commented on August 15, 2024

xklb and yt-dlp versions' freeze is another serious issue

My guess is that:

  1. Stale versions of xklb & yt-dlp were incidental yesterday. As @nzola did not know he was supposed to run...

    pipx upgrade --include-injected xklb
    

    ...during upgrade of IIAB Calibre-Web.

  2. His fresh install today might have the latest xklb & yt-dlp even though these (sadly) do not appear in the logs. Hopefully he'll confirm later today: #187 (comment)

from calibre-web.

holta avatar holta commented on August 15, 2024

@deldesir please try to solve this within the week:

@nzola has done yet another fresh install (Raspberry Pi OS 12 on Raspberry Pi 400) and the Syntax Error with "Bad Gateway" result is the same — journalctl -u calibre-web shows:

 -- Boot bd5d4bea20094c508bd257d7e65b63c6 --
Jun 23 22:07:42 box systemd[1]: Started calibre-web.service - Calibre-Web.
Jun 23 22:08:23 box python3[640]: Traceback (most recent call last):
Jun 23 22:08:23 box python3[640]:   File "/usr/local/calibre-web-py3/cps.py", line 51, in <module>
Jun 23 22:08:23 box python3[640]:     main()
Jun 23 22:08:23 box python3[640]:   File "/usr/local/calibre-web-py3/cps/main.py", line 38, in main
Jun 23 22:08:23 box python3[640]:     from .editbooks import editbook
Jun 23 22:08:23 box python3[640]:   File "/usr/local/calibre-web-py3/cps/editbooks.py", line 45, in <module>
Jun 23 22:08:23 box python3[640]:     from .tasks.metadata_extract import TaskMetadataExtract
Jun 23 22:08:23 box python3[640]:   File "/usr/local/calibre-web-py3/cps/tasks/metadata_extract.py", line 142
Jun 23 22:08:23 box python3[640]:     self.message += f"<br><br>Unavailable Video(s):<br>{'<br>'.join(f'<a href="{url}" target="_blank">{url}</a>' for url in self.unavailable)}"
Jun 23 22:08:23 box python3[640]:                                                                                ^
Jun 23 22:08:23 box python3[640]: SyntaxError: f-string: unterminated string
Jun 23 22:14:07 box systemd[1]: Stopping calibre-web.service - Calibre-Web...
Jun 23 22:14:09 box systemd[1]: calibre-web.service: Main process exited, code=exited, status=1/FAILURE
Jun 23 22:14:09 box systemd[1]: calibre-web.service: Failed with result 'exit-code'.
Jun 23 22:14:09 box systemd[1]: Stopped calibre-web.service - Calibre-Web.
Jun 23 22:14:09 box systemd[1]: calibre-web.service: Consumed 9.638s CPU time.
-- Boot 4f00d3b217004ff8a9c468432ca50d46 --

iiab-diagnostics: https://dpaste.com/H7G5CDLGZ

from calibre-web.

holta avatar holta commented on August 15, 2024

Possibly the problem resulted from Python 3.11 within Debian 12 "Bookworm" ≈ Raspberry Pi OS 12?

As compared to Python 3.12 within Ubuntu 24.04+ having more modern f-string support?

In any case it appears fixed, thanks to:

from calibre-web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.