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

Failed Loading in Config File #23

Open
rtgurley opened this issue Jul 9, 2019 · 4 comments
Open

Failed Loading in Config File #23

rtgurley opened this issue Jul 9, 2019 · 4 comments

Comments

@rtgurley
Copy link

rtgurley commented Jul 9, 2019

Using Python 3.6
I run python main.py and this is the result that I get. I am not sure what other information you want.

C:\Program Files\Python36>python main.py
Failed loading in config file.
Plex Username: [email protected]
Password:

0: Movies
1: ZZZ Testing

Select section index: 0
Traceback (most recent call last):
File "main.py", line 92, in
plex = Plex()
File "main.py", line 29, in init
self.media = self.get_flat_media(self.section)
File "main.py", line 57, in get_flat_media
return self.section.all()
File "C:\Program Files\Python36\lib\site-packages\plexapi\library.py", line 383, in all
return self.fetchItems(key, **kwargs)
File "C:\Program Files\Python36\lib\site-packages\plexapi\base.py", line 148, in fetchItems
items = self.findItems(data, cls, ekey, **kwargs)
File "C:\Program Files\Python36\lib\site-packages\plexapi\base.py", line 169, in findItems
item = self._buildItemOrNone(elem, cls, initpath)
File "C:\Program Files\Python36\lib\site-packages\plexapi\base.py", line 87, in _buildItemOrNone
return self._buildItem(elem, cls, initpath)
File "C:\Program Files\Python36\lib\site-packages\plexapi\base.py", line 79, in _buildItem
return ecls(self._server, elem, initpath)
File "C:\Program Files\Python36\lib\site-packages\plexapi\base.py", line 48, in init
self._loadData(data)
File "C:\Program Files\Python36\lib\site-packages\plexapi\video.py", line 168, in _loadData
Video._loadData(self, data)
File "C:\Program Files\Python36\lib\site-packages\plexapi\video.py", line 33, in _loadData
self.addedAt = utils.toDatetime(data.attrib.get('addedAt'))
File "C:\Program Files\Python36\lib\site-packages\plexapi\utils.py", line 181, in toDatetime
value = datetime.fromtimestamp(int(value))
OSError: [Errno 22] Invalid argument

@r3volution11
Copy link

Pretty much the same problem for me except on macOS.

@alex-phillips
Copy link
Owner

Looking into this as I'm unable to reproduce. I might have one of you run a test version of the code to get more information.

@rtgurley
Copy link
Author

Let me know what I can do. Does it matter where I unzip the folder to and run the "pip install" and "main.py" commands from? Currently I am running them from C:\Program Files\Python36\plex-autocollections-master

@michealespinola
Copy link

michealespinola commented Nov 9, 2019

The error is not actually "Failed loading in config file". That is a message that it spits out if you haven't hardcoded your URL and TOKEN, and the script instead needs your username and password.

The only times I see a "yard sale" of errors like shown here is if there are incompatible characters in the collections.yml file. Typically its from errant use of the colon (":")

Except for lines that specify a collection name - all lines that specify a movie name should not contain a colon. Replace any colons with a period. The parsing of the collections.yml file is not 100% regex compatible. Escaping the colon with a "" does not work. HTH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants