Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled exception in processdir.. ordinal not in range #28

Open
ChristopherP1221 opened this issue Jan 8, 2020 · 3 comments
Open

Comments

@ChristopherP1221
Copy link

To help with identifying and fixing issues, please include as much information as possible, including:

LazyLibrarian version number (at the bottom of config page)

Operating system used (windows, mac, linux, NAS type)

Interface in use (default, bookstrap)

Which api (Goodreads, GoogleBooks, both)

Source of your LazyLibrarian installation (git, zip file, 3rd party package)

Relevant debug log with api keys and any passwords redacted

Please note - usually a single line of log is not sufficient. The lines just before the error occurs can give useful context and greatly assist with debugging.

There is a built-in debug log creator on the logs page which makes it easy to provide this information

  • To use it, first go to the log page and make sure debug logging is OFF
  • Now press the "Start debug log" button
  • Go and do whatever you need to recreate the error
  • Go back to the log page and press "Save debug log"
  • You can now turn debug logging off again if you want
  • The saved log file will be found in your lazylibrarian log directory called debug.zip
  • It will contain all lines logged since you pressed "Start debug log" with any passwords and api keys removed
  • Attach the zip file to your bug report.

Hello,

I'm new to using this app but I do love it so far. I have a couple of quirky things on, only one of which has an error that you can look but hopefully you can provide some direction on the other.

Here is some info on my setup:
I am running Freenas 11.2 with LL installed in its own jail. I am leveraging sabnzb as my download client which is running in a separate jail. I am able to see downloads processing in sabnzb so I know the two systems can talk to each other. I have all of the users in the "wheel" group and have made all of the relative directory permissions in LL 775 (probably overkill, I know).

First, I'm seeing the below error in my log. I've gone through the docs and can't seem to find a incorrect setting that might be leading to it. My permissions seem to be good because at least some of the files are making it to the correct directories. Any ideas on what I might do to resolve this and/or what else it could be impacting?

`

2020-01-07 18:53:02 DEBUG Thread-167 postprocess.py processDir 1167 Returning {'status': 'failed'}
2020-01-07 18:53:02 ERROR POSTPROCESS postprocess.py processDir 1163 Unhandled exception in processDir: Traceback (most recent call last): File "/usr/local/share/lazylibrarian/lazylibrarian/postprocess.py", line 650, in processDir mult = multibook(pp_path, recurse=True) File "/usr/local/share/lazylibrarian/lazylibrarian/common.py", line 117, in multibook for _, _, f in walk(foldername): File "/usr/local/share/lazylibrarian/lazylibrarian/common.py", line 174, in walk if isdir(join(top, name)): File "/usr/local/lib/python3.6/genericpath.py", line 42, in isdir st = os.stat(s) UnicodeEncodeError: 'ascii' codec can't encode character '\ufffd' in position 174: ordinal not in range(128)
2020-01-07 18:53:02 DEBUG POSTPROCESS postprocess.py processDir 633 Found folder (100%) [/mnt/downloads/sabnzbd/completed/library/Prof Peter N Stearns - A Brief History of the World (2007) MP3] for AudioBook Prof Peter N Stearns - A Brief History of the World (2007) MP3
2020-01-07 18:53:02 DEBUG POSTPROCESS postprocess.py processDir 584 processDir found '/mnt/downloads/sabnzbd/completed/library/Prof Peter N Stearns - A Brief History of the World (2007) MP3'
2020-01-07 18:53:02 DEBUG POSTPROCESS postprocess.py processDir 579 100% match Prof Peter N Stearns - A Brief History of the World (2007) MP3 : Prof Peter N Stearns - A Brief History of the World (2007) MP3
2020-01-07 18:53:02 DEBUG POSTPROCESS postprocess.py processDir 564 Checking extn on Prof Peter N Stearns - A Brief History of the World (2007) MP3
`

Second, my Sabnzb "completed" downloads folder seems to have a lot of completed download files that LL is not detecting and moving. I can't, for the life of me, figure out why this is occurring so any guidance would be appreciated. Here are some details around permissions in the directories. If there is a fast way to get you all of my LL app settings, please just ask and I will attach them.

700 files in the completed download dir
root@lazylibrarian:/mnt/downloads/sabnzbd/completed/library # ls | wc -l
700

Permissions for each of the folders in the path above
total 52
drwxr-xr-x 7 root wheel 7B Jan 1 18:53 .
drwxr-xr-x 5 root wheel 5B Jan 1 21:11 ..
drwxrwxr-x+ 62 lazylibrarian wheel 62B Jan 6 23:00 audiobooks
drwxrwxr-x+ 2 lazylibrarian wheel 2B Jan 1 18:35 books
drwxrwxr-x+ 2 lazylibrarian wheel 2B Jan 1 18:35 comics
drwxrwxr-x+ 38 lazylibrarian wheel 38B Jan 5 00:09 ebooks
drwxrwxr-x+ 2 lazylibrarian wheel 2B Jan 1 18:35 magazines
root@lazylibrarian:/mnt/media # cd ..
root@lazylibrarian:/mnt # ls -alh
total 35
drwxr-xr-x 5 root wheel 5B Jan 1 21:11 .
drwxr-xr-x 19 root wheel 23B Jan 1 18:57 ..
drwxr-xr-x 3 root wheel 3B Jan 1 21:11 downloads
drwxr-xr-x 7 root wheel 7B Jan 1 18:53 media
drwxr-xr-x 2 lazylibrarian wheel 2B Jan 1 18:34 nzb
root@lazylibrarian:/mnt # cd downloads/
root@lazylibrarian:/mnt/downloads # ls -alh
total 2
drwxr-xr-x 3 root wheel 3B Jan 1 21:11 .
drwxr-xr-x 5 root wheel 5B Jan 1 21:11 ..
drwxr-xr-x 3 root wheel 3B Jan 1 21:11 sabnzbd
root@lazylibrarian:/mnt/downloads # cd sabnzbd/
root@lazylibrarian:/mnt/downloads/sabnzbd # ls -alh
total 2
drwxr-xr-x 3 root wheel 3B Jan 1 21:11 .
drwxr-xr-x 3 root wheel 3B Jan 1 21:11 ..
drwxr-xr-x 3 root wheel 3B Jan 1 21:11 completed
root@lazylibrarian:/mnt/downloads/sabnzbd # cd completed/
root@lazylibrarian:/mnt/downloads/sabnzbd/completed # ls -alh
total 289
drwxr-xr-x 3 root wheel 3B Jan 1 21:11 .
drwxr-xr-x 3 root wheel 3B Jan 1 21:11 ..
drwxrwxr-x+ 702 root wheel 702B Jan 7 19:21 library

As you can see, the lazylibrarian user is in the wheel group so these folders should be accessible by the group perms
root@lazylibrarian:/mnt/downloads/sabnzbd/completed/library # groups lazylibrarian
lazylibrarian wheel

Here is what my media directory perms looks like, I limited the results for ease of reading but as you can see, 51 total folders, there is media making it to my audiobooks dir as well
root@lazylibrarian:/mnt/media/ebooks # ls -alh
total 51
drwxrwxr-x+ 38 lazylibrarian wheel 38B Jan 5 00:09 .
drwxr-xr-x 7 root wheel 7B Jan 1 18:53 ..
drwxr-xr-x+ 3 lazylibrarian wheel 3B Jan 1 21:34 A.J. Finn
drwxr-xr-x+ 3 lazylibrarian wheel 3B Jan 1 21:34 Aaron Blabey
drwxr-xr-x+ 3 lazylibrarian wheel 3B Jan 1 22:46 Alex Michaelides
drwxr-xr-x+ 3 lazylibrarian wheel 3B Jan 1 22:46 Andrzej Sapkowski
drwxr-xr-x+ 3 lazylibrarian wheel 3B Jan 1 22:58 Angie Thomas
drwxr-xr-x+ 3 lazylibrarian wheel 3B Jan 1 22:58 Aziz Ansari
drwxr-xr-x+ 3 lazylibrarian wheel 3B Jan 1 22:46 Brian Kilmeade
drwxr-xr-x+ 3 lazylibrarian wheel 3B Jan 1 22:46 Bryan Stevenson

@ChristopherP1221
Copy link
Author

ChristopherP1221 commented Jan 8, 2020

-Here are the packages and other info for LL:

Startup cmd: ['/usr/local/bin/python', '/usr/local/share/lazylibrarian/LazyLibrarian.py', '--daemon', '--pidfile', '/config/lazylibrarian.pid', '--datadir', '/config', '--nolaunch'] Interface: bookstrap Loglevel: 2 Sys_Encoding: UTF-8 git_repo: lazylibrarian git_user: LazyLibrarian git_branch: master latest_version: ba156875f828e5a79fb4c4cbebf2c3a353033ed8 git_updated: Mon Jan 6 18:51:20 2020 current_version: ba156875f828e5a79fb4c4cbebf2c3a353033ed8 git_host: gitlab.com commits_behind: 0 install_type: git auto_update: 1 db version: 58 Python version: ['3.6.9 (default, Dec 10 2019, 01:12:23) ', '[GCC 4.2.1 Compatible FreeBSD Clang 8.0.0 (tags/RELEASE_800/final 356365)]'] uname: uname_result(system='FreeBSD', node='lazylibrarian', release='11.2-STABLE', version='FreeBSD 11.2-STABLE #0 r325575+c9231c7d6bd(HEAD): Mon Nov 18 22:46:47 UTC 2019 root@nemesis:/freenas-releng/freenas/_BE/objs/freenas-releng/freenas/_BE/os/sys/FreeNAS.amd64', machine='amd64', processor='amd64') Platform: FreeBSD-11.2-STABLE-amd64-64bit-ELF urllib3: 1.25.7 requests: 2.22.0 tls: TLS 1.2 cherrypy: 3.6.0 sqlite3: 3.29.0 unrar2: library version 0.99.7 openssl: OpenSSL 1.0.2o-freebsd 27 Mar 2018 pyOpenSSL: 19.0.0 cryptography: 2.6.1 fuzzywuzzy: 0.14.0 Levenshtein: None magic: libmagic.so.4

Screenshot of my sabnzb queue:
image

Showing a file that was processed above still sitting in the Sabnzb completed download folder, things don't seem to be moving

root@lazylibrarian:/mnt/downloads/sabnzbd/completed/library # ls -alh | grep Cristina
drwxrwxrwx+ 2 root wheel 3B Jan 7 10:51 Cristina Henriquez-The Book of Unknown Americans (epub)

@ChristopherP1221
Copy link
Author

Full debug log if you need it.
debug.zip

@ChristopherP1221
Copy link
Author

Regarding the file moving problem, I added my sabnzb download directory to the "alternate directory" field which was blank previously and everything began moving. I assumed the system would automatically move things from the downloader directories into the library, is this incorrect?

I feel like I may have just managed to hack around whatever problem I actually have and that this isn't the correct solution. Can someone confirm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant