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

Receiving init() missing 1 required positional argument: ‘certification_country’ when first starting Kodi #1657

Closed
kpmelvin opened this issue Oct 11, 2021 · 26 comments
Labels
Python 3 Starting with Kodi 19 Matrix, Kodi uses Python 3

Comments

@kpmelvin
Copy link

kpmelvin commented Oct 11, 2021

I'm getting the above error when first starting Kodi. It's a fresh install of Kodi 19.2 and PlexKodiConnect Beta v3.5.3.
kodi.log

Providing updated log. It appears the error happens right after various media scanners initialize.

Excerpt,
2021-10-12 07:20:57.405 T:11612 DEBUG : MUSIC_INFO::CMusicInfoScanner::Process - Starting scan
2021-10-12 07:20:57.406 T:7856 ERROR : PLEX.utils: Error encountered: - init() missing 1 required positional argument: 'certification_country'

..............................

2021-10-12 07:20:57.411 T:7856 ERROR : PLEX.utils: return tmdb.TMDBMovieScraper(settings, language, certcountry)
2021-10-12 07:20:57.411 T:7856 ERROR : PLEX.utils: TypeError: init() missing 1 required positional argument: 'certification_country'
............................

kodi.log

@attinderdhillon
Copy link

I have the same issue on latest Beta.

@fana13
Copy link

fana13 commented Oct 12, 2021

Same here, same config

@ghallford
Copy link

Same issue but doesn't happen all the time

@ghost
Copy link

ghost commented Oct 12, 2021

Also happens on the matrix stable version. PMS is on a Synology 920+, and have 2 Nvidia shield tv pro 2019

@jun6lee
Copy link

jun6lee commented Oct 13, 2021

Seeing this a lot. I have a lot of foreign media, may be connected?!

@croneter
Copy link
Owner

I'm a bit at a loss here. This issue is caused by PKC calling another Kodi add-on called metadata.themoviedb.org.python. Looking at their latest source-code, nothing changed.

  • Do you guys have some special installation of metadata.themoviedb.org.python?
  • Can anyone with this issue (that I can't reproduce) share this file here on Github?
<Kodi directory>/addons/metadata.themoviedb.org.python/python/lib/tmdbscraper/tmdb.py

@croneter croneter added the Python 3 Starting with Kodi 19 Matrix, Kodi uses Python 3 label Oct 14, 2021
@gthoma20
Copy link

tmdb.zip
I found this error on my google tv. Uploading the file as per your request

@ghost
Copy link

ghost commented Oct 14, 2021

I opend and closed kodi a few times, and the message is gone.

@fana13
Copy link

fana13 commented Oct 14, 2021

Me too, message is gone on my windows computer and my Shield.
I don't do anything without open and close Kodi

@kpmelvin
Copy link
Author

kpmelvin commented Oct 14, 2021

I'm running on Windows 10. Attached is a copy of my tmdb.py file.
tmdb.zip
.

@ghost
Copy link

ghost commented Oct 14, 2021

I use a shield 2019 pro and have seen this message before, after I installed this plugin in kodi android. My PMS is installed on a synology. Sorry forgot to mention.

@fana13
Copy link

fana13 commented Oct 15, 2021

Message come back this morning on my Shield
Here the tmdb.py file
tmdb.zip

@croneter
Copy link
Owner

croneter commented Oct 15, 2021

Here's the culprit:
Original metadata.themoviedb.org.python-code

class TMDBMovieScraper(object):
    def __init__(self, url_settings, language, certification_country):
        self.url_settings = url_settings
        self.language = language
        self.certification_country = certification_country
        self._urls = None

The code you guys got:

class TMDBMovieScraper(object):
    def __init__(self, url_settings, language, search_language, certification_country):
        self.url_settings = url_settings
        self.language = language
        self.search_language = search_language
        self.certification_country = certification_country
        self._urls = None

So you seem to be using this fork: https://github.com/mkaflowski/metadata.themoviedb.org.python instead of the "original" Kodi https://github.com/xbmc/metadata.themoviedb.org.python. Officially, this change is "just" a pull request: xbmc/metadata.themoviedb.org.python#101.

I know what to do to fix this, but it'll need some time.

By the way, another change is in the works that changes this classe's signature: xbmc/metadata.themoviedb.org.python#66

@ghost
Copy link

ghost commented Oct 15, 2021

I just checkt in kodi (android), and i have indeed that code, but it is standard kodi install, and the plugin is from kodi team. Did not change anything. No idea how it is mixed up.

Edit: I only change the language in the plugin itself.

@attinderdhillon
Copy link

I also have the default Kodi install.

@fana13
Copy link

fana13 commented Oct 15, 2021

Same for me, add-on 1.4.2 team Kodi

@mkaflowski
Copy link

I have added default value: https://github.com/mkaflowski/metadata.themoviedb.org.python/blob/master/python/lib/tmdbscraper/tmdb.py
Is that going to help?

@kpmelvin
Copy link
Author

I have added default value: https://github.com/mkaflowski/metadata.themoviedb.org.python/blob/master/python/lib/tmdbscraper/tmdb.py Is that going to help?

I'm baffled as to how the fork got installed. In any case I pasted your change into the tmdb.py file. It worked, I no longer get the error when I start Kodi.

FWIW I checked the version, it's 1.4.2 by Team Kodi.

@boardlord1
Copy link

I have added default value: https://github.com/mkaflowski/metadata.themoviedb.org.python/blob/master/python/lib/tmdbscraper/tmdb.py Is that going to help?

I'm baffled as to how the fork got installed. In any case I pasted your change into the tmdb.py file. It worked, I no longer get the error when I start Kodi.

FWIW I checked the version, it's 1.4.2 by Team Kodi.

Indeed, by replacing tmdb.py with the version mkaflowski linked to, the error is gone. Thanks!

@ghost
Copy link

ghost commented Oct 16, 2021

I can confirm, by replacing it, the error is gone.

@mkaflowski
Copy link

You can just download zip from my fork. I have made pull request and hope that it will be in official channel but I am little confused where should I commit because there are 2 repositories.

@croneter
Copy link
Owner

Please try PKC version 3.5.4. Hopefully fixes this easily...

@ghost
Copy link

ghost commented Oct 16, 2021

@croneter yes, this fixs the problem. Thank you for your work.,😁

@attinderdhillon
Copy link

I am on the stable repo, Will it auto-update?
Sorry, I am new to kodi.

@kpmelvin
Copy link
Author

@croneter confirmed as well, your update fixed the issue when using the 1.4.2 version of tmdb.py

much appreciated

@croneter
Copy link
Owner

Thanks for reporting back!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Python 3 Starting with Kodi 19 Matrix, Kodi uses Python 3
Projects
None yet
Development

No branches or pull requests

9 participants