#invalid literal for int() with base 10

1 messages ยท Page 1 of 1 (latest)

versed nebula
#

Hi ! I've have just updated my PMM in Kometa 2.0.0 and after my first run, i got this error...

Traceback (most recent call last):                                                                 |
|   File "C:\Kometa\kometa.py", line 656, in run_libraries                                           |
|     library.map_guids(temp_items)                                                                  |
|   File "C:\Kometa\modules\library.py", line 375, in map_guids                                      |
|     id_type, main_id, imdb_id = self.config.Convert.get_id(item, self)                             |
|   File "C:\Kometa\modules\convert.py", line 250, in get_id                                         |
|     elif url_parsed.scheme == "tmdb":               tmdb_id.append(int(url_parsed.netloc))         |
| ValueError: invalid literal for int() with base 10: 'tt24478470'                                   |
|                                                                                                    |
| invalid literal for int() with base 10: 'tt24478470'
blissful sunBOT
#

Welcome @versed nebula!

It looks like you have not yet completed the id:customize section of our Discord server, this will allow us to help you quicker.

Someone from <@&938443185347244033> will assist when they're available.

Including meta.log from the beginning is a huge help. Type !logs for more information.

After attaching your log, do not forget to hit the green check boxes when prompted by our bot.

#

You can press the "Close Post" button above or type /close at any time to close this post.

gaunt furnace
#

I got this same error just barely

vital bolt
#

Can you provide a log showing the error in context?

gaunt furnace
blissful sunBOT
#

๐Ÿ“ If you want to review this again, keitaro26:
:one: Right-click (or long press with phone) on the message that contains the log
:two: Select: Copy Message Link
:three: Use the command: /logscan <message_link> or !logscan <message_link> and paste the value copied from the previous step where you see <message_link> ๐Ÿ“

#

๐Ÿ“ If you want to review this again, warzonefury:
:one: Right-click (or long press with phone) on the message that contains the log
:two: Select: Copy Message Link
:three: Use the command: /logscan <message_link> or !logscan <message_link> and paste the value copied from the previous step where you see <message_link> ๐Ÿ“

#
**User Info**

Author of Linked Message: Keitaro26
Person who Invoked the Command: Luma
File Name: meta.log

Table of Contents:
Page 01: User Info
Page 02: Kometa Info
Page 03: Kometa Summary Info
Page 04: Kometa Config.yml YAML Validation โœ…
Page 05: Plex Configuration - Section 1
Page 06: Plex Configuration - Section 2
Page 07: Plex Configuration - Section 3
Page 08: Rec 01 - ๐Ÿ’ฅ [CRITICAL]
Page 09: Rec 02 - โš ๏ธ [WARNING]

#
**User Info**

Author of Linked Message: Warzonefury
Person who Invoked the Command: Luma
File Name: meta.log.2

Table of Contents:
Page 01: User Info
Page 02: Kometa Info
Page 03: Kometa Summary Info
Page 04: Kometa Config.yml YAML Validation โœ…
Page 05: Plex Configuration - Section 1
Page 06: Plex Configuration - Section 2
Page 07: Plex Configuration - Section 3
Page 08: Plex Configuration - Section 4
Page 09: Plex Configuration - Section 5
Page 10: Rec 01 - ๐Ÿš€ PLEXAPI UPDATE AVAILABLE
Page 11: Rec 02 - ๐Ÿ’ฅ [CRITICAL]
Page 12: Rec 03 - โŒ [ERROR]
Page 13: Rec 04 - โš ๏ธ [WARNING]
Page 14: Rec 05 - ๐Ÿ’ฌ CONVERT WARNING

versed nebula
blissful sunBOT
#

๐Ÿ“ If you want to review this again, warzonefury:
:one: Right-click (or long press with phone) on the message that contains the log
:two: Select: Copy Message Link
:three: Use the command: /logscan <message_link> or !logscan <message_link> and paste the value copied from the previous step where you see <message_link> ๐Ÿ“

versed nebula
#

It seems to be for the same movie @gaunt furnace ๐Ÿ˜…

vital bolt
#

This seems like a metadata issue in Plex, or bad data from TMDB or somewhere

|  Cache  |  ^  | plex://movie/61af6d01dd07b061652f98c9          | TMDb ID: 912598  | IMDb ID: tt16360006 | Bubble |
| Traceback (most recent call last):                                                                 |
|   File "//kometa.py", line 656, in run_libraries                                                   |
|     library.map_guids(temp_items)                                                                  |
|   File "/modules/library.py", line 375, in map_guids                                               |
|     id_type, main_id, imdb_id = self.config.Convert.get_id(item, self)                             |
|                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                             |
|   File "/modules/convert.py", line 250, in get_id                                                  |
|     elif url_parsed.scheme == "tmdb":               tmdb_id.append(int(url_parsed.netloc))         |
|                                                                    ^^^^^^^^^^^^^^^^^^^^^^          |
| ValueError: invalid literal for int() with base 10: 'tt24478470'                                   |
|                                                                                                    |
| invalid literal for int() with base 10: 'tt24478470'                                               |

Seems like it's trying to convert the TMDB ID to an int, which would work, but it's getting the IMDB ID in that location instead.

#

Oh, that movie showed up in a similar context earlier

gaunt furnace
versed nebula
#

Links seem good

vital bolt
#

This:

| invalid literal for int() with base 10: 'tt24478470'                                               |

indicates that the code is expecting an integer but is being handed a string. There must be something about that specific movie either at TMDB/IMDB or in Plex, since otherwise this would happen all the time for everything.

Probably there should be some guardrails there, but this is extremely uncommon and so far is seen only on this one movie.

gaunt furnace
#

Is there any way to verbose the logging to see specifically why it is calling the IMDB instead of TMDB ID?

#

I can see in the traceback where it did it, but not why

#

File "/modules/library.py", line 375, in map_guids |
| id_type, main_id, imdb_id = self.config.Convert.get_id(item, self)

rich bramble
#

its getting that data from the plex xml

#

i need to see that movies xml data

gaunt furnace
rich bramble
#
<Guid id="imdb://tt24478470"/>
<Guid id="tmdb://1061990"/>
<Guid id="tmdb://tt24478470"/>
#

this is the issue

#

idk why plex has <Guid id="tmdb://tt24478470"/>

#

try refreshing the metadata for that movie

gaunt furnace
#

Done, still there, just added one more

#

<Guid id="imdb://tt24478470"/>
<Guid id="tmdb://1061990"/>
<Guid id="tmdb://tt24478470"/>
<Guid id="tvdb://343835"/>

versed nebula
#

I have:

<Guid id="imdb://tt8523334"/>
<Guid id="tmdb://469274"/>
<Guid id="tvdb://3016"/>
rich bramble
rich bramble
versed nebula
rich bramble
#

i can add a way to get past the error but ultimately this is an issue with the plex agent having the wrong data

versed nebula
rich bramble
#

just pushed a fix to nightly if either of you want to test

#

docker will take about 5 minutes to build if you use it

versed nebula
#

I'm going to test that now

gaunt furnace
#

I'm trying a plex dance

#

Plex dance did not fix

versed nebula
gaunt furnace
#

Cool, switching to nightly

versed nebula
#

My overlay is good

#

Thx you for your time and speedy @rich bramble โค๏ธ

gaunt furnace
#

Confirmed, nightly works for me as well

versed nebula
#

marked as solved ! Thx and by all ๐Ÿ˜‰

rich bramble
#

no problem glad the fix worked