GithubHelp home page GithubHelp logo

pytvmaze's People

Contributors

bfrot avatar labrys avatar liiight avatar srob650 avatar stefanw avatar stevezau avatar venomous avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pytvmaze's Issues

show_akas fails to run

show_akas fails to run

>>> show_akas(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pytvmaze/tvmaze.py", line 383, in __repr__
    return '<AKA(name={name},country={country})>'.format(name=name, country=country)
NameError: name 'name' is not defined

AttributeError: module 'pytvmaze' has no attribute 'TVMaze'

Still struggling. Can't figure out why I get the above mentioned error.

`>>> import pytvmaze

tvm = pytvmaze.TVMaze(username, api_key)
Traceback (most recent call last):
File "", line 1, in
AttributeError: module 'pytvmaze' has no attribute 'TVMaze'
`

AttributeError: partially initialized module 'pytvmaze' has no attribute 'TVMaze'

When I run the same code step by step in the Terminal it works, within a python file it gives the above-mentioned error. Not sure what I'm doping wrong.

`import pytvmaze

username = xxx
api_key = xxx'

show = 'Only Murders In The Building'
season = 2
number = 3

tvm = pytvmaze.TVMaze(username, api_key)
showtvm = tvm.get_show(show_name=show, embed='episodes')
ep = showtvm[season][number]`

Flexget discover error

Hello im using flexget and discover, everything was working fine but last few day im getting error:

2016-04-23 14:18 CRITICAL task get_tvshows BUG: Unhandled error in plugin discover: 'NoneType' object has no attribute '__getitem__' Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/flexget/task.py", line 438, in __run_plugin return method(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/flexget/event.py", line 22, in __call__ return self.func(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/input/discover.py", line 274, in on_task_input entries = self.estimated(entries, estimation_mode) File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/input/discover.py", line 190, in estimated est_date = estimator.estimate(entry) File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/estimators/est_released.py", line 28, in estimate estimate = estimator(entry) File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/estimators/est_release_series_tvmaze.py", line 51, in estimate episode = lookup(**kwargs) File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 31, in wrapper return func(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/api_tvmaze.py", line 520, in episode_lookup series = APITVMaze.series_lookup(session=session, only_cached=only_cached, **lookup_params) File "/usr/local/lib/python2.7/dist-packages/flexget/utils/database.py", line 28, in wrapper return func(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/api_tvmaze.py", line 467, in series_lookup pytvmaze_show = get_show(**prepared_params) File "/usr/local/lib/python2.7/dist-packages/pytvmaze/tvmaze.py", line 415, in get_show show_web_channel, embed=embed) File "/usr/local/lib/python2.7/dist-packages/pytvmaze/tvmaze.py", line 467, in _get_show_by_search show = _get_show_with_qualifiers(show_name, qualifiers) File "/usr/local/lib/python2.7/dist-packages/pytvmaze/tvmaze.py", line 444, in _get_show_with_qualifiers country = show.web_channel['country']['code'].lower() TypeError: 'NoneType' object has no attribute '__getitem__'
Could you please help me solve this :) Im using last version of flexget 1.2.521

Dict ordering in python3

Fuzzy matching will produce the below error in python3:

File "/usr/local/lib/python3.4/dist-packages/pytvmaze/tvmaze.py", line 93, in get_show
s = fuzzymatch.fuzzy_search(search_text, results)
File "/usr/local/lib/python3.4/dist-packages/pytvmaze/fuzzymatch.py", line 115, in fuzzy_search
return max(matches, key=lambda key: matches[key])
TypeError: unorderable types: dict() > dict()

More detail here I believe. http://stackoverflow.com/questions/22333388/dicts-are-not-orderable-in-python-3

I will try work up a pull request.

[BUG] AttributeError: 'Character' object has no attribute '_repr_obj'

When attempting to convert a Character to unicode:

>>> import pytvmaze
>>> show = pytvmaze.get_show(maze_id=161, embed='cast')
>>> unicode(show.cast.people[0].character)

Traceback (most recent call last):
  File "<pyshell#18>", line 1, in <module>
    unicode(show.cast.people[0].character)
  File "C:\Python27x64\lib\site-packages\pytvmaze\tvmaze.py", line 255, in __unicode__
    return self._repr_obj(as_unicode=True)
AttributeError: 'Character' object has no attribute '_repr_obj'

Getting episodes for Fixer Upper does not work

Doing this (3341 is the ID for the show Fixer Upper):

import pytvmaze
show = pytvmaze.get_show(maze_id=3341, embed='episodes')

Results in error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/pytvmaze/tvmaze.py", line 374, in get_show
    return show_main_info(maze_id, embed=embed)
  File "/usr/local/lib/python2.7/site-packages/pytvmaze/tvmaze.py", line 563, in show_main_info
    return Show(q)
  File "/usr/local/lib/python2.7/site-packages/pytvmaze/tvmaze.py", line 56, in __init__
    self.populate(data)
  File "/usr/local/lib/python2.7/site-packages/pytvmaze/tvmaze.py", line 112, in populate
    self.episodes.append(Episode(episode))
  File "/usr/local/lib/python2.7/site-packages/pytvmaze/tvmaze.py", line 163, in __init__
    self.summary = _remove_tags(data.get('summary'))
  File "/usr/local/lib/python2.7/site-packages/pytvmaze/tvmaze.py", line 319, in _remove_tags
    return re.sub(r'<.*?>', '', text)
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 155, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or buffer

get_followed_shows throws error

tvm = pytvmaze.TVMaze("[email protected]", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
tvm.get_followed_shows()
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\h.fauland\Downloads_Projects\myTvOrganizer\venv\lib\site-packages\pytvmaze\tvmaze.py", line 739, in get_followed_shows
return [FollowedShow(show) for show in q]
File "C:\Users\h.fauland\Downloads_Projects\myTvOrganizer\venv\lib\site-packages\pytvmaze\tvmaze.py", line 739, in
return [FollowedShow(show) for show in q]
File "C:\Users\h.fauland\Downloads_Projects\myTvOrganizer\venv\lib\site-packages\pytvmaze\tvmaze.py", line 414, in init
self.maze_id = data.get('show_id')
AttributeError: 'str' object has no attribute 'get'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.