#Trakt Pin issue

1 messages · Page 1 of 1 (latest)

leaden agate
#

I enter my trakt pin and it expires after 1 run of the script. Is there any long term solution. It validates on that first run but nothing after.

stiff sluice
#

That shouldn't happen. Does the config file get updated with the rest of the trakt information?

leaden agate
#

Client ID and Secret are good.

#

Don't think so. Where would I look? First ti.e setting up here.

#

Time

stiff sluice
#

In the config file right next to where you are entering the pin.

leaden agate
#

Which lines should populate?

stiff sluice
#

All those lines under "authorization"

leaden agate
#

No they do not

#

Only thing is scope: public

stiff sluice
#

Then apparently PMM can't write to the config file?

#

Odd that one thing populates, though.

#

how are you running PMM and in what environment?

leaden agate
#

Unraid

#

Docker

stiff sluice
#

and the log shows it authenticating correctly?

#

normally I'd say this is permissions, but since the one field updates that doesn't seem like the issue.

leaden agate
#

Only the first time. And not any other

stiff sluice
#

I think the pin is single-use, so that part isn't surprising.

#

What's surprising is that is doesn't update all the fields in the config.

cyan isle
#

would looking at the log helP?

stiff sluice
#

It would be interesting to see if there were any breadcrumbs in the form of an error or the like when the successful auth happens and the config file should get updated.

cyan isle
#

please provide log

leaden agate
#

The log is where I found it. I will look and take a screen shot.

stiff sluice
#

Then just paste the entire block it produces into the config file.

cyan isle
#

please send log not screenshot

#

screenshots are harder to read

leaden agate
#

Ok

molten lanceBOT
#
Providing Log Files

You have been asked to provide your log file, which will allow us to support you further.

You can find your meta.log file within the logs folder of your Plex Meta Manager config folder [right next to config.yml].

You can drag-and-drop your meta.log file directly into Discord, you do not need to upload it to a third-party site unless it exceeds the 50mb size limit.

Please DO NOT manually extract, copy and paste text from your log files directly into Discord as the formatting can be difficult to read and can often redact parts of the log file that are important for full context.

leaden agate
cyan isle
#

says you client id or client secret is invalid

#

so next part would be to check out that portion of your config

stiff sluice
#

That sounds familiar. I think this has come up before and the solution was either a new trakt app or a different trakt account.

#
Config Warning: trakt sub-attribute pin not found using None as default 
#

maybe indentation is off?

leaden agate
#

Should I pull the log from the first run?

stiff sluice
#

This:

[INFO]     | Connecting to Trakt...
[WARNING]  | Config Warning: trakt sub-attribute pin not found using None as default                                              | trakt sub-attribute pin added to config
[INFO]     | Navigate to: https://trakt.tv/oauth/...
[INFO]     | If you get an OAuth error ...
[ERROR]    | Input Failed
[INFO]     | Trakt Connection Failed

is expected if there is no pin in the config.

leaden agate
#

Agree. It works the first run, and not any other.

stiff sluice
#

This is one of the later failing runs?

cyan isle
#

i suggested we see the config file

leaden agate
stiff sluice
#

This line:

[WARNING]  | Config Warning: trakt sub-attribute pin not found using None as default

shows that the pin attribute is not even present in the file, and I don't think it gets removed once used. This is really odd.

#

Can I see the log from the first, successful run?

stiff sluice
#
trakt:
  client_id: #####
  client_secret: ########
  pin: 
# Everything below this line is automatically generated
  authorization:
    access_token:
    token_type:
    expires_in:
    refresh_token:
    scope: public
    created_at:
  pin:

Note the two "pin" entries; PMM can't see one of those so it's creating the other.

cyan isle
leaden agate
#

which lines? Maybe I am missing them. I put ###s in the stripped

stiff sluice
#

If I start with this:

trakt:
  client_id: bingbangboing
  client_secret: boingbangbing
  authorization:
    access_token:
    token_type:
    expires_in:
    refresh_token:
    scope:
    created_at:
  pin: AFED19BC

The log shows:

| Connecting to Trakt...                                    |
| Saving authorization information to /config/sb-config.yml |
| Trakt Connection Successful                               |

and the config now shows this:

trakt:
  client_id: bingbangboing
  client_secret: boingbangbing
  authorization:
    access_token: foobarbaz
    token_type: Bearer
    expires_in: 7889237
    refresh_token: bazbarfoo
    scope: public
    created_at: 1664646039
  pin:

So it apparently does empty the pin.

cyan isle
stiff sluice
cyan isle
#

wouldn't he remove that 2nd pin attribute?

#

cause my config only has pin there once

stiff sluice
#

The log shows that PMM added it.

#
[INFO]     | Connecting to Trakt...
[WARNING]  | Config Warning: trakt sub-attribute pin not found using None as default
           | trakt sub-attribute pin added to config  << RIGHT HERE
cyan isle
#

yep. maybe on the first run, pin was not alligned correctly

stiff sluice
#

The first run shows no problems:

[INFO]     | Connecting to Trakt...
[INFO]     | Saving authorization information to /config/config.yml
[INFO]     | Trakt Connection Successful
#

BUT, this is interesting.

#

the first run shows 17 attributes missing from the config and added.

#

the second failing run shows those same 17 attributes missing from the config and added again.

leaden agate
#

I have also left the original pin in and it would not validate. Let me see if I can find that log

stiff sluice
#

I think something is overwriting your config file before the run.

#

Or you're not using the config file above.

cyan isle
#

is there possibly another config file that isn't mapped correctly?

stiff sluice
#

Log says, for example:

Config Warning: settings sub-attribute asset_depth not found...
settings sub-attribute asset_depth added to config

But that config file above shows that it is in fact not missing:

settings:
  ...
  asset_depth: 0
#

so either there's a problem reading the config file OR the config file above is not the one being used by the script.

#

The config file looks fine, so I don't think there's a problem with it.

cyan isle
#

That’s what it seems like there is another config file involved

leaden agate
#

I have been editing and editing one to try to fix trakt

stiff sluice
#

What does the unraid container config look like?

#

So the config file above is not the one that produces those logs?

#

If that's some other random config, then this exercise has been futile.

#

The logs you've provided are showing errors that this config file should not have produced.

cyan isle
#

I’m with you @stiff sluice the errors showing, don’t seem to match the config we’re looking at

leaden agate
stiff sluice
#

What config file produced this log?

#

If it wasn't the one provided above, there's no point in my looking at it.

#

Until you provide the config that generated it.

#

Shows all the same errors.

cyan isle
#

Agreed

leaden agate
#

I have been editing and editing the same one. I have not changed the trakt area.

cyan isle
#

But the errors don’t match the config file

stiff sluice
#

For example:

Connecting to Movies Library...                               [ERROR]    | Config Error: metadata_path attribute is blank

but in the config above that isn't true:

libraries:
  Movies:
    metadata_path:
    - file: config/Holiday.yml
leaden agate
#

ok, I will run a new log with a new pin with the latest config then then run it again to fail.

stiff sluice
#

The log reports loading one TV metadata file, but the config contains two.

#

I'm virtually certain that config is not the one being used by the script.

cyan isle
#

In addition, what I see is there has to be a separate config file save somewhere else, possibly mapped incorrectly, that is being run instead of the above config

#

I’m just trying to help

#

It’s helping me in the process

leaden agate
#

I appreciate the assistance.

#

PMM run 1 in progress

stiff sluice
#

Here are the things that the script is saying are missing and maybe added:

omdb attribute not found
mdblist attribute not found
mal attribute not found
playlist_files attribute not found

Those are in fact not present, so these errors are accurate.

These, however:

settings sub-attribute asset_depth added to config
settings sub-attribute prioritize_assets added to config
settings sub-attribute dimensional_asset_rename added to config
settings sub-attribute download_url_assets added to config
settings sub-attribute show_missing_season_assets added to config
settings sub-attribute show_missing_episode_assets added to config
settings sub-attribute show_asset_not_needed added to config
settings sub-attribute default_collection_order added to config
settings sub-attribute item_refresh_delay added to config
settings sub-attribute delete_not_scheduled added to config
settings sub-attribute only_filter_missing added to config
settings sub-attribute show_options added to config
settings sub-attribute playlist_sync_to_users added to config
settings sub-attribute playlist_report added to config
settings sub-attribute verify_ssl added to config
settings sub-attribute custom_repo added to config
settings sub-attribute check_nightly added to config
tmdb sub-attribute cache_expiration added to config
tmdb sub-attribute region added to config

radarr sub-attribute upgrade_existing added to config
radarr sub-attribute radarr_path added to config
radarr sub-attribute plex_path added to config

sonarr sub-attribute upgrade_existing added to config
sonarr sub-attribute sonarr_path added to config
sonarr sub-attribute plex_path added to config

The config file you've provided has these things in it, however you've also provided multiple logs with these very same things reported as missing. That should only happen once unless someone or something is removing them between the two runs that show them missing.

#

BTW, there's an automatic config-redactor, in case you're doing that manually:

molten lanceBOT
#
Providing a redacted config.yml file

You have been asked to provide your config file, which will allow us to support you further.

Please DO NOT share your config.yml file as is without redacting it. It contains information that you do not want the public to have, nor do we need it to troubleshoot your scenario in MOST cases.

We will use a regex parser to redact the file for you.

:one: Goto https://regex101.com/r/DMo1DQ/latest
:two: Copy the contents of your config.yml to the TEST STRING box in that page
:three: The results will be immediate and found in the SUBSTITUTION box below
:four: From the SUBSTITUTION box, select all, then copy and paste the redacted text into the channel where you want to share your config. (You will see (redacted) where confidential information was replaced)

Consider using Discord code blocks when sharing small parts of your config file. Check out !code for more info on code blocks

unborn bramble
#

also i notice your config is named config-stripped2.yml. if you dont name it config.yml then you have to specify the config when you run with --config

cyan isle
#

after he stripped stuff

unborn bramble
#

thats possible but if he didnt then that would be a cause as to the multiple configs

leaden agate
unborn bramble
#

his first config he sent is called config-stripped.yml so thats why i said something

cyan isle
#

yep, for sure

unborn bramble
#

if you have multiple config*.yml in the config folder then you have to specify the config in your command

leaden agate
#

it is called config.yml in the docker container. Nother else called config*.yml

unborn bramble
#

just making sure

cyan isle
#

@stiff sluice did ask to see how the unraid container was configured

#

i don't have unraid experience so that issue i could not help with

unborn bramble
cyan isle
#

yes, so far none of the log files have matched up with the config files

leaden agate
#

PMM run 2 in progress

cyan isle
#

why a 2nd run?

stiff sluice
#

What happened to run 1?

leaden agate
#

It fails on run2

unborn bramble
#

then we need the log

stiff sluice
#

show me the log from run 1, please.

cyan isle
#

we need the log and config from run 1

leaden agate
#

Pulling log from run1

stiff sluice
#

presumably the config is the one above.

leaden agate
#

it is

cyan isle
#

ok, just was making sure

leaden agate
unborn bramble
#

your root_folder for radarr is wrong

#

should be /1_movies

stiff sluice
#

What does the config look like right now?

unborn bramble
#

for run 2 correct?

stiff sluice
#

Yes, the config should now contain the trakt authentication info.

#

Though that log does not show it writing that info.

leaden agate
stiff sluice
#
[INFO]     | Connecting to Trakt...       |
[INFO]     | Trakt Connection Successful  |
unborn bramble
#

you have an issue here too

[2022-10-01 14:20:31,250] [library.py:141]            [ERROR]    | YAML Error: mapping values are not allowed here                                                    |
                                                                 |         in "/config/TVCharts.yml", line 47, column 12
leaden agate
unborn bramble
#
trakt:
  client_id: #######
  client_secret: #######
  pin: #######
# Everything below this line is automatically generated
  authorization:
    access_token:
    token_type:
    expires_in:
    refresh_token:
    scope: public
    created_at:
``` this should be filled in now though. is it?
leaden agate
#

looking

#

It was filled in and trakt now works. Weird.

#

[INFO] | Connecting to Trakt... |
[INFO] | Trakt Connection Successful

unborn bramble
#

awesome. just need to change root_folder for radarr and fix the issue in your TVCharts.yml

cyan isle
#

that was weird, but glad we could all help

#

spectacular!!!!

unborn bramble
#

if you send your tvcharts yml we can look and see whats going on if you want

leaden agate
#

Let me change the config for radarr folder and run it.

unborn bramble
#
  IMDB Popular:
    template: { name: Chart, num: 4 }
    tmdb_popular: 40
    imdb_list:
      url: https://www.imdb.com/search/title/?title_type=tv_series,tv_miniseries
      limit: 40
    summary: IMDB Popular Shows across the internet
  IMDB Top Rated:
    template: { name: Chart, num: 5 }
    imdb_list:
      url: https://www.imdb.com/search/title/?title_type=tv_series,tv_miniseries&num_votes=20000,&sort=user_rating,desc
      limit: 100
    tmdb_top_rated: 100
    summary: Top Rated IMDB TV series across the internet

so this whole part here you are mixing tmdb and imdb stuff

leaden agate
#

I think I found the issue, I think I was writing over the section below "# Everything below this line is automatically generated" evertime I changed the config

leaden agate
unborn bramble
#

tmdb_popular: 40
tmdb_top_rated: 100

leaden agate
#

I see those 2 lines, thanks.

stiff sluice
leaden agate
#

I appreciate everyone's help. You people are awesome.

stiff sluice
#

I assume you had an open editor and never reloaded?

cyan isle
leaden agate
#

Ok, case closed. Thanks everyone.

cyan isle
#

your welcome

#

have a good day