CodyBerenson / PGMA-Modernized

An updated approach for Plex Gay Media Adult Agents for both Full Feature Films and Scenes
MIT License
123 stars 45 forks source link

[BUG]: Multiple Agents failing with Could Not Set Agent Parameters QUIT #305

Open fourstix opened 3 weeks ago

fourstix commented 3 weeks ago

Mandatory

Describe the bug:

Multiple agents are failing to scrape due to an error in the log 'Could Not Set Agent Parameters QUIT' after upgrading to the latest version.

I added a new film named (Falcon) - Tahoe Snow Plowed.mp4 and noticed that the agents did not scrape the metadata. I stopped and restarted the Plex Server, and turned off the VPN client service, but the agents still will not scrape.

After attempting to scrap, I see this message in the tail of the all agent logs (using GEVI as an example):

2024-06-27 09:15:51,147 (7fb4cee61b38) : INFO (sandbox:19) - GEVI - ---------------------------------------------------------------------------------------------------- 2024-06-27 09:15:51,147 (7fb4cee61b38) : INFO (sandbox:19) - GEVI - UTILS :: Start Scrape Process ❌ No 2024-06-27 09:15:51,148 (7fb4cee61b38) : INFO (sandbox:19) - GEVI - **** 2024-06-27 09:15:51,149 (7fb4cee61b38) : INFO (sandbox:19) - GEVI - **** 2024-06-27 09:15:51,150 (7fb4cee61b38) : INFO (sandbox:19) - GEVI - **** 2024-06-27 09:15:51,392 (7fb4cee61b38) : ERROR (utils:5497) - GEVI - SEARCH:: ❌ File: , Line: , Function: _process_function_call -> search -> search 2024-06-27 09:15:51,392 (7fb4cee61b38) : ERROR (utils:5498) - GEVI - SEARCH:: Error: Could Not Set Agent Parameters QUIT 2024-06-27 09:15:51,393 (7fb4cee61b38) : INFO (sandbox:19) - GEVI - **** 2024-06-27 09:15:51,395 (7fb4cee61b38) : DEBUG (runtime:88) - Sending packed state data (104 bytes) 2024-06-27 09:15:51,396 (7fb4cee61b38) : DEBUG (runtime:924) - Response: [200] str, 320 bytes 2024-06-27 09:15:51,435 (7fb4cee61b38) : DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.GEVI/messaging/function/X0FnZW50S2l0OkVyYXNlTWV0YWRhdGE/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMgpzNQpNb3ZpZXMxMAptZWRpYV90eXBlczQ3CmNvbS5wbGV4YXBwLmFnZW50cy5HYXlBZHVsdEZpbG1zOi8vODU5OD9sYW5nPWVuczQKZ3VpZHIwCg 2024-06-27 09:15:51,438 (7fb4cee61b38) : DEBUG (runtime:49) - Received packed state data (80 bytes) 2024-06-27 09:15:51,440 (7fb4cee61b38) : DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.GEVI/messaging/function/X0FnZW50S2l0OkVyYXNlTWV0YWRhdGE/Y2VyZWFsMQoxCmxpc3QKMApyMAo/Y2VyZWFsMQoxCmRpY3QKMgpzNQpNb3ZpZXMxMAptZWRpYV90eXBlczQ3CmNvbS5wbGV4YXBwLmFnZW50cy5HYXlBZHVsdEZpbG1zOi8vODU5OD9sYW5nPWVuczQKZ3VpZHIwCg 2024-06-27 09:15:51,444 (7fb4cee61b38) : DEBUG (runtime:88) - Sending packed state data (104 bytes) 2024-06-27 09:15:51,444 (7fb4cee61b38) : DEBUG (runtime:924) - Response: [200] str, 16 bytes

These agents were all working previously before the update to the latest version.

Specific Agent(s) Causing the Issue:

GEVI, AEBN, GayEmpire, GayHotMovies (basically all the agents I use except the NFOImporter agent.)

Index Site URL(s) Attempting to Match:

https://gayeroticvideoindex.com/video/47804

Log Attached:

GayAdultFilm.log
com.plexapp.agents.GayAdultFilms.log

GEVI.log com.plexapp.agents.GEVI.log

AEBN.log com.plexapp.agents.AEBN.log

GayEmpire.log com.plexapp.agents.GayEmpire.log

GayHotMovies.log com.plexapp.agents.GayHotMovies.log

system.log com.plexapp.system.log

Optional

Screenshot(s) with all nudity redacted:

Screenshot 2024-06-27 092300

Additional Context:

Desktop (please complete the following information):

OS: [e.g. iOS] Qnap QTS 5.1.7.2770 (based on Linux Ubuntu)
Browser [e.g. chrome, safari] Firefox 127.01 64-bit
Version [e.g. 22]: Plex Media Server 1.40.3
JPH71 commented 3 weeks ago

Go to settings...agents.. gay films... and cluck the gear icon and save the settings for each agent... then restart plex... it looks like you gave lost your agent preferences..

The json files were not touch, that deal with the preferences, so I do not understand why this is happening to you..

On Thu, 27 Jun 2024, 15:30 fourstix, @.***> wrote:

Mandatory Describe the bug:

Multiple agents are failing to scrape due to an error in the log 'Could Not Set Agent Parameters QUIT' after upgrading to the latest version.

I added a new film named (Falcon) - Tahoe Snow Plowed.mp4 and noticed that the agents did not scrape the metadata. I stopped and restarted the Plex Server, and turned off the VPN client service, but the agents still will not scrape.

After attempting to scrap, I see this message in the tail of the all agent logs (using GEVI as an example):

2024-06-27 09:15:51,147 (7fb4cee61b38) : INFO (sandbox:19) - GEVI -

2024-06-27 09:15:51,147 (7fb4cee61b38) : INFO (sandbox:19) - GEVI - UTILS :: Start Scrape Process ❌ No 2024-06-27 09:15:51,148 (7fb4cee61b38) : INFO (sandbox:19) - GEVI -


2024-06-27 09:15:51,149 (7fb4cee61b38) : INFO (sandbox:19) - GEVI -


2024-06-27 09:15:51,150 (7fb4cee61b38) : INFO (sandbox:19) - GEVI -


2024-06-27 09:15:51,392 (7fb4cee61b38) : ERROR (utils:5497) - GEVI - SEARCH:: ❌ File: , Line: , Function:

*process_function_call -> search -> search 2024-06-27 09:15:51,392 (7fb4cee61b38) : ERROR (utils:5498) - GEVI - SEARCH:: Error: Could Not Set Agent Parameters QUIT 2024-06-27 09:15:51,393 (7fb4cee61b38) : INFO (sandbox:19) - GEVI -


2024-06-27 09:15:51,395 (7fb4cee61b38) : DEBUG (runtime:88) - Sending packed state data (104 bytes) 2024-06-27 09:15:51,396 (7fb4cee61b38) : DEBUG (runtime:924) - Response: [200] str, 320 bytes 2024-06-27 09:15:51,435 (7fb4cee61b38) : DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.GEVI/messaging/function/X0FnZW50S2l0OkVyYXNlTWV0YWRhdGE/Y2VyZWFsMQoxCmxpc3QKMApyMAo* /Y2VyZWFsMQoxCmRpY3QKMgpzNQpNb3ZpZXMxMAptZWRpYV90eXBlczQ3CmNvbS5wbGV4YXBwLmFnZW50cy5HYXlBZHVsdEZpbG1zOi8vODU5OD9sYW5nPWVuczQKZ3VpZHIwCg 2024-06-27 09:15:51,438 (7fb4cee61b38) : DEBUG (runtime:49) - Received packed state data (80 bytes) 2024-06-27 09:15:51,440 (7fb4cee61b38) : DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.GEVI/messaging/function/X0FnZW50S2l0OkVyYXNlTWV0YWRhdGE/Y2VyZWFsMQoxCmxpc3QKMApyMAo/Y2VyZWFsMQoxCmRpY3QKMgpzNQpNb3ZpZXMxMAptZWRpYV90eXBlczQ3CmNvbS5wbGV4YXBwLmFnZW50cy5HYXlBZHVsdEZpbG1zOi8vODU5OD9sYW5nPWVuczQKZ3VpZHIwCg 2024-06-27 09:15:51,444 (7fb4cee61b38) : DEBUG (runtime:88) - Sending packed state data (104 bytes) 2024-06-27 09:15:51,444 (7fb4cee61b38) : DEBUG (runtime:924) - Response: [200] str, 16 bytes

These agents were all working previously before the update to the latest version. Specific Agent(s) Causing the Issue:

GEVI, AEBN, GayEmpire, GayHotMovies (basically all the agents I use except the NFOImporter agent.) Index Site URL(s) Attempting to Match:

https://gayeroticvideoindex.com/video/47804 Log Attached:

GayAdultFilm.log com.plexapp.agents.GayAdultFilms.log https://github.com/user-attachments/files/16014747/com.plexapp.agents.GayAdultFilms.log

GEVI.log com.plexapp.agents.GEVI.log https://github.com/user-attachments/files/16014748/com.plexapp.agents.GEVI.log

AEBN.log com.plexapp.agents.AEBN.log https://github.com/user-attachments/files/16014749/com.plexapp.agents.AEBN.log

GayEmpire.log com.plexapp.agents.GayEmpire.log https://github.com/user-attachments/files/16014752/com.plexapp.agents.GayEmpire.log

GayHotMovies.log com.plexapp.agents.GayHotMovies.log https://github.com/user-attachments/files/16014755/com.plexapp.agents.GayHotMovies.log

system.log com.plexapp.system.log https://github.com/user-attachments/files/16014768/com.plexapp.system.log Optional Screenshot(s) with all nudity redacted:

Screenshot.2024-06-27.092300.jpg (view on web) https://github.com/CodyBerenson/PGMA-Modernized/assets/5274281/9d17c7c4-51ac-4569-a161-278cf79210b9 Additional Context: Desktop (please complete the following information):

OS: [e.g. iOS] Qnap QTS 5.1.7.2770 (based on Linux Ubuntu) Browser [e.g. chrome, safari] Firefox 127.01 64-bit Version [e.g. 22]: Plex Media Server 1.40.3

— Reply to this email directly, view it on GitHub https://github.com/CodyBerenson/PGMA-Modernized/issues/305, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKI3AKNPTIBBNQEDWAPSMFDZJQHWJAVCNFSM6AAAAABJ76GPZ2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGM3TQMJWHA3DAMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

fourstix commented 3 weeks ago

Just did that for the "Gay Adult", "Gay Adult Scenes" and "Gay Adult Films" agents, then stopped and restarted the Plex server. I still get the same errors in the logs.

(I went through each agent listed in those entries, edited and saved the properties for each one.)

JPH71 commented 3 weeks ago

Ok, I will look through the logs and get back to you.

On Thu, 27 Jun 2024, 16:42 fourstix, @.***> wrote:

Just did that for the "Gay Adult", "Gay Adult Scenes" and "Gay Adult Films" agents, then stopped and restarted the Plex server. I still get the same errors in the logs.

— Reply to this email directly, view it on GitHub https://github.com/CodyBerenson/PGMA-Modernized/issues/305#issuecomment-2194914438, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKI3AKJ7XD6HBJNDG3IG7CTZJQQETAVCNFSM6AAAAABJ76GPZ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJUHEYTINBTHA . You are receiving this because you commented.Message ID: @.***>

fourstix commented 3 weeks ago

In case you need it to help debugging, I pretty much have all the options set off for the agents, and Use Background Art is the only box I have checked, plus I have the xml token set.

Here is a screen shot for the GEVI agent, all the agents are configured like this:

GEVI Settings 1 GEVI Settings 2

JPH71 commented 3 weeks ago

cheers - for this - looking at it now as i have a friend popping over for drinks to celebrate the end of his exams later!

On Thu, 27 Jun 2024 at 17:30, fourstix @.***> wrote:

In case you need it to help debugging, I pretty much have all the options set off for the agents, and Use Background Art is the only box I have checked, plus I have the xml token set.

Here is a screen shot for the GEVI agent, all the agents are configured like this:

GEVI.Settings.1.jpg (view on web) https://github.com/CodyBerenson/PGMA-Modernized/assets/5274281/e7416e6d-8262-4ce6-912c-7bf8198ab770 GEVI.Settings.2.jpg (view on web) https://github.com/CodyBerenson/PGMA-Modernized/assets/5274281/6cb1f2da-4572-4567-ac30-e1a1c3e1b170

— Reply to this email directly, view it on GitHub https://github.com/CodyBerenson/PGMA-Modernized/issues/305#issuecomment-2195171525, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKI3AKMUDRHOD7KHVSXBUMTZJQ42HAVCNFSM6AAAAABJ76GPZ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJVGE3TCNJSGU . You are receiving this because you commented.Message ID: @.***>

JPH71 commented 3 weeks ago

Could you try this, and then let me: https://drive.google.com/file/d/1qI3hmzzIlkDVF5jlqwTx6vES8eG8bSvF/view?usp=sharing

put it in the code folder for each agent... then let me know.

Another thing: make sure all your genre tidy files do not have an empty line even at the end.

Cheers and thanks for finding this!

Cheers

Jason

On Thu, 27 Jun 2024 at 17:33, Jason Hudson @.***> wrote:

cheers - for this - looking at it now as i have a friend popping over for drinks to celebrate the end of his exams later!

On Thu, 27 Jun 2024 at 17:30, fourstix @.***> wrote:

In case you need it to help debugging, I pretty much have all the options set off for the agents, and Use Background Art is the only box I have checked, plus I have the xml token set.

Here is a screen shot for the GEVI agent, all the agents are configured like this:

GEVI.Settings.1.jpg (view on web) https://github.com/CodyBerenson/PGMA-Modernized/assets/5274281/e7416e6d-8262-4ce6-912c-7bf8198ab770 GEVI.Settings.2.jpg (view on web) https://github.com/CodyBerenson/PGMA-Modernized/assets/5274281/6cb1f2da-4572-4567-ac30-e1a1c3e1b170

— Reply to this email directly, view it on GitHub https://github.com/CodyBerenson/PGMA-Modernized/issues/305#issuecomment-2195171525, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKI3AKMUDRHOD7KHVSXBUMTZJQ42HAVCNFSM6AAAAABJ76GPZ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJVGE3TCNJSGU . You are receiving this because you commented.Message ID: @.***>

fourstix commented 3 weeks ago

Hi Jason, I made sure that UserGenres.txt and UserGayTidy.txt did not have any blank lines in them and I copied the utils.py file into the agent directories, then stopped and restarted Plex, but I still get the same error.

fourstix commented 3 weeks ago

You got me thinking, which is always dangerous. I went in and renamed my UserGayTidy.txt and my UserGenres.txt files to add xxx before their names so they would not be processed. I also unchecked all but the GEVI agent to simplify things. This allowed the GEVI to run and scrape the movie.

My User files are from the old release, I didn't update them so they probably don't match the new ones.

fourstix commented 3 weeks ago

Renaming xxUserGenres.txt back to UserGenres.txt and rerunning the Refresh Metadata option works. The GEVI agent scrapped successfully. However renaming xxxUserTidy.txt back to UserTidy.txt causes it to fail again.

Here's the offending UserTidy.txt file that causes the Agents to fail: UserGayTidy.txt

I ran a file compare and they are very different, with unique lines in both files. So I'm going to try editing the new GayTidy.txt file to create a new UserTidy.txt that has the same lines but with different Genres and see if that works.

fourstix commented 3 weeks ago

In case you need it, here is the UserGenres.txt file that I am using. UserGenres.txt

fourstix commented 3 weeks ago

I updated the UserGayTidy.txt file, but it still fails. I wonder if it's due to the fact that it's not picking up the UserGenre.txt genres that I added. For example, I see an error message following each instance of the "Pre-Condom" genre like this:

2024-06-27 17:50:39,778 (7fbd50a82b38) : INFO (sandbox:19) - GEVI - UTILS :: UserGayTidy.txt: Duplicate Row - Replace Setting Row 1755 - Vintage / Classic Porn::Pre-Condom 2024-06-27 17:50:39,779 (7fbd50a82b38) : INFO (sandbox:19) - GEVI - UTILS :: UserGayTidy.txt: Not Found in GayGenres.txt Row 1755 - Vintage / Classic Porn::Pre-Condom

JPH71 commented 3 weeks ago

I will look at this in the morning... If you create a brand new genre, you also have to create an icon for it...

Is it passing the previous error?

On Fri, 28 Jun 2024, 00:03 fourstix, @.***> wrote:

I updated the UserGayTidy.txt file, but it still fails. I wonder if it's due to the fact that it's not picking up the UserGenre.txt genres that I added. For example, I see an error message following each instance of the "Pre-Condom" genre like this:

2024-06-27 17:50:39,778 (7fbd50a82b38) : INFO (sandbox:19) - GEVI - UTILS :: UserGayTidy.txt: Duplicate Row - Replace Setting Row 1755 - Vintage / Classic Porn::Pre-Condom 2024-06-27 17:50:39,779 (7fbd50a82b38) : INFO (sandbox:19) - GEVI - UTILS :: UserGayTidy.txt: Not Found in GayGenres.txt Row 1755 - Vintage / Classic Porn::Pre-Condom

— Reply to this email directly, view it on GitHub https://github.com/CodyBerenson/PGMA-Modernized/issues/305#issuecomment-2195734062, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKI3AKLKXVQ2LHWHPVG5CGTZJSDZNAVCNFSM6AAAAABJ76GPZ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJVG4ZTIMBWGI . You are receiving this because you commented.Message ID: @.***>

fourstix commented 3 weeks ago

Edit: Sorry, I forgot to restore the UserGayTidy.txt file in my first test The new genres all had icon files in the black directory, and it was failing at exactly the same place.

I copied the new icon files into all of the color directories under the Genre directory, it worked without the UserGayTidy.txt file. But when I restored the UserGayTidy.txt file, it fails in the exact same place.

JPH71 commented 3 weeks ago

That is correct... Genres have to have an icon

On Fri, 28 Jun 2024, 12:35 fourstix, @.***> wrote:

The new genres all had icon files in the black directory, and it was failing at exactly the same place. I copied the new icon files into all of the color directories under the Genre directory, and now the GEVI agent appears to be working.

It used to work when /Genre/black was the only directory with the new genre icons. Now I guess it's required to add them to all colors to define the genres, even though have the genre collection set to "No" rather than a color.

— Reply to this email directly, view it on GitHub https://github.com/CodyBerenson/PGMA-Modernized/issues/305#issuecomment-2196602304, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKI3AKO6J2US4H5EFCL3IBLZJU36TAVCNFSM6AAAAABJ76GPZ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJWGYYDEMZQGQ . You are receiving this because you commented.Message ID: @.***>

fourstix commented 3 weeks ago

I've done some more playing around.

Here are the UserGenres.txt and UserGayTidy.txt file that I would like to have work on my Plex server for the agents. If I rename these files as GayGenres.txt and GayTidy.txt in the _PGMA directory, then the Agent will work with the new Genres.

UserGayTidy.txt UserGenres.txt

Since the agent works with these Genre and Tidy files as base files, with no errors in the log, that indicates to me that the file contents are consistent, with no internal errors. I think they should be processed as valid UserGenres.txt and UserGayTidy.txt files.

However if I try to add or update the original Genres with these files as user files, named as UserGenres.txt and UserGayTidy.txt and using the original base GayGenres.txt and GayTidy.txt files, then the entries in UserGayTidy.txt that map to a new Genre fail with the following message.

2024-06-28 09:08:27,990 (7fbd50a82b38) : INFO (sandbox:19) - GEVI - UTILS :: 7. Prepare Tidied Dictionary of Genres and Countries 2024-06-28 09:08:27,991 (7fbd50a82b38) : INFO (sandbox:19) - GEVI - UTILS :: Tidy Files ['GayTidy.txt', 'UserGayTidy.txt'] 2024-06-28 09:08:27,993 (7fbd50a82b38) : INFO (sandbox:19) - GEVI - UTILS :: UserGayTidy.txt: Not Found in GayGenres.txt Row 29 - 3 Some::Group Sex 2024-06-28 09:08:27,993 (7fbd50a82b38) : INFO (sandbox:19) - GEVI - UTILS :: UserGayTidy.txt: Not Found in GayGenres.txt Row 30 - 3 Some (Boy/Boy/Girl)::Group Sex 2024-06-28 09:08:27,994 (7fbd50a82b38) : INFO (sandbox:19) - GEVI - UTILS :: UserGayTidy.txt: Not Found in GayGenres.txt Row 32 - 3-Way::Group Sex 2024-06-28 09:08:27,995 (7fbd50a82b38) : INFO (sandbox:19) - GEVI - UTILS :: UserGayTidy.txt: Not Found in GayGenres.txt Row 34 - 40+::Bears 2024-06-28 09:08:27,995 (7fbd50a82b38) : INFO (sandbox:19) - GEVI - UTILS :: UserGayTidy.txt: Not Found in GayGenres.txt Row 38 - 50+::Bears 2024-06-28 09:08:27,996 (7fbd50a82b38) : INFO (sandbox:19) - GEVI - UTILS :: UserGayTidy.txt: Not Found in GayGenres.txt Row 39 - 70's::Pre-Condom

It looks like the Genre dictionary did not get the UserGenres added to it, so all the lines in the UserGayTidy that point to new genres are giving an error.
fourstix commented 3 weeks ago

One more thing. If I manually merge the User Genres into the GayGenres file, then the GayTidy.txt and UserGayTidy.txt files processed without errors and Agent runs correctly. But if I have the original GayGenres.txt file and the UserGenres.txt files separate, the Agent fails to scrape with the errors noted above.

fourstix commented 3 weeks ago

I can get it down to a simple case where adding single new user genre will cause the agents to fail.

Here are the UserGenre.txt and UserGayTidy.txt files and icon file that define a single new Genre "Socks" which is currently not mapped, along with the GEVI agent log file showing that the new Genre caused the agent to fail.

SimpleUserGenres.txt SimpleUserGayTidy.txt

Socks

com.plexapp.agents.GEVI.log