nwithan8 / PlexRecs

A Discord bot that provides movie, TV show and music recommendations from your Plex library
GNU General Public License v3.0
39 stars 5 forks source link

Sorry, something went wrong while looking for a recommendation. #7

Closed Septan closed 4 years ago

Septan commented 4 years ago

Using the lastest commit

Error in makeLibrary: Expecting value: line 1 column 1 (char 0)
Error in makeLibrary: Expecting value: line 1 column 1 (char 0)
Error in makeLibrary: Expecting value: line 1 column 1 (char 0)
Error in makeLibrary: Expecting value: line 1 column 1 (char 0)
Error in makeLibrary: Expecting value: line 1 column 1 (char 0)

Logged in as : Recommendations - 
Version: 1.1.1

Successfully logged in and booted...!
Error in findRec: Cannot choose from an empty sequence
Command raised an exception: AttributeError: 'bool' object has no attribute 'title'
Exception in callback _typing_done_callback(<Task cancell...nagers.py:41>>) at C:\Python38\lib\site-packages\discord\context_managers.py:29
handle: <Handle _typing_done_callback(<Task cancell...nagers.py:41>>) at C:\Python38\lib\site-packages\discord\context_managers.py:29>
Traceback (most recent call last):
  File "C:\Python38\lib\asyncio\events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "C:\Python38\lib\site-packages\discord\context_managers.py", line 32, in _typing_done_callback
    fut.exception()
asyncio.exceptions.CancelledError
nwithan8 commented 4 years ago

It seems your LIBRARIES configuration in credentials.py might be invalid. Can you share what your LIBRARIES variable is?

Septan commented 4 years ago

Its what I have in config

# For example, to recommend something from an 'anime' group, users will have to use the word 'anime' in their command.
LIBRARIES = {
    'movie': [3],
    'show': [1],
    'musical artist': [2],
    '4k': [4],
    'anime': [9]
}
nwithan8 commented 4 years ago

And of course it works no problem on my end, making this a lot harder :) There's a JSON parse issue going on here. For some reason, the script isn't interpreting the LIBRARIES variable JSON as valid. Since it can't read it, it doesn't load any libraries into cache, and therefore can't select a random item from an empty library list.

Perhaps there's a stray mark somewhere in credentials.py that is messing it up? Do you have an accidental double "", or maybe a ' " mismatch?

Septan commented 4 years ago

I had deleted it before started the issue, it still wasn't working. I had it working before. I deleted it again and redid everything it working now. I didn't have any extra " or mismatch or anything. I not sure what was causing it not to work.