Error thrown when attempting to list PMS library sections

Server Version#: 1.21.0.3711

As described, getting the following error when attempting to list library IDs via the --help documentation:

chris@chris-x1c6:/usr/lib/plexmediaserver$ /usr/lib/plexmediaserver/Plex\ Media\ Scanner --list
terminate called after throwing an instance of 'soci::soci_error'
  what():  sqlite3_statement_backend::prepare: no such column: library_sections.content_changed_at for SQL: select library_sections.id as 'library_sections_id', library_sections.library_id as 'library_sections_library_id', library_sections.name as 'library_sections_name', library_sections.name_sort as 'library_sections_name_sort', library_sections.section_type as 'library_sections_section_type', library_sections.language as 'library_sections_language', library_sections.agent as 'library_sections_agent', library_sections.scanner as 'library_sections_scanner', library_sections.user_thumb_url as 'library_sections_user_thumb_url', library_sections.user_art_url as 'library_sections_user_art_url', library_sections.user_theme_music_url as 'library_sections_user_theme_music_url', library_sections.created_at as 'library_sections_created_at', library_sections.updated_at as 'library_sections_updated_at', library_sections.scanned_at as 'library_sections_scanned_at', library_sections.user_fields as 'library_sections_user_fields', library_sections.query_xml as 'library_sections_query_xml', library_sections.query_type as 'library_sections_query_type', library_sections.uuid as 'library_sections_uuid', library_sections.changed_at as 'library_sections_changed_at', library_sections.content_changed_at as 'library_sections_content_changed_at' from library_sections
****** PLEX MEDIA SCANNER CRASHED, CRASH REPORT WRITTEN: /home/chris/Library/Application Support/Plex Media Server/Crash Reports/1.21.0.3711-b509cc236/PLEX MEDIA SCANNER/05ec6c6e-5018-d21a-71716911-1d30cce8.dmp
Error in command line:the argument for option '--serverUuid' should follow immediately after the equal sign
Crash Uploader options (all are required):
  --directory arg       Directory to scan for crash reports
  --serverUuid arg      UUID of the server that crashed
  --userId arg          User that owns this product
  --platform arg        Platform string
  --platformVersion arg Platform version string
  --vendor arg          Vendor string
  --device arg          Device string
  --model arg           Device model string
  --sentryUrl arg       Sentry URL to upload to
  --sentryKey arg       Sentry Key for the project
  --version arg         Version of the product
  --allowRetries arg    Whether we will allow retries
Aborted (core dumped)

I wasn’t able to retrieve and view the crash report in the location specified to debug. Can anyone shed light on what the source of the issue is here?

Ultimately trying to scan specified libraries for new media via the command line.

@cdiddy

How is environment setup ? ENV? UID? all that.

It’s not something you can just call ad-hoc without configuring the shell.

@ChuckPa , if I’m understanding you’re looking for environment variables, any in particular?

Re UID, running this as root (ie, sudo ...)

That’s what I suspected.

It’s UID/GID and Environment variable sensitive.

  1. UID/GID must be that of user plex
  2. PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR must be set.

@ChuckPa , this worked, thanks.

For reference, I followed the following steps:
(1) updated .basrc file to set the PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR, in my case to the default /var/lib/plexmediaserver/Library/Application Support location
(2) source the updated file
(3) log in as user plex (sudo su plex)
(4) run original command(/usr/lib/plexmediaserver/Plex\ Media\ Scanner --list) to retrieve library IDs.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.