Giter Club home page Giter Club logo

statify's People

Contributors

0xflotus avatar cbochs avatar foobuzz avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

statify's Issues

broken?

please help!!! this is my favorite tool and it doesn't work anymore

$ statify pull
^C^CTraceback (most recent call last):
  File "/home/pi/.local/bin/statify", line 10, in <module>
    sys.exit(main())
  File "/home/pi/.local/lib/python3.7/site-packages/statify/statify.py", line 36, in main
    code = _main(args)
  File "/home/pi/.local/lib/python3.7/site-packages/statify/statify.py", line 101, in _main
    pull_playlists(spotify, database)
  File "/home/pi/.local/lib/python3.7/site-packages/statify/statify.py", line 172, in pull_playlists
    spotify_tracks = list(spotify.playlist_tracks(playlist_obj.spotify_id))
  File "/home/pi/.local/lib/python3.7/site-packages/statify/spotify_client.py", line 126, in playlist_tracks
    page_size=100,  # Max allowed
  File "/home/pi/.local/lib/python3.7/site-packages/statify/spotify_client.py", line 81, in _paginate_spotipy_method
    **kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/spotipy/client.py", line 634, in playlist_tracks
    market, additional_types)
  File "/home/pi/.local/lib/python3.7/site-packages/spotipy/client.py", line 663, in playlist_items
    additional_types=",".join(additional_types)
  File "/home/pi/.local/lib/python3.7/site-packages/spotipy/client.py", line 284, in _get
    return self._internal_call("GET", url, payload, kwargs)
  File "/home/pi/.local/lib/python3.7/site-packages/spotipy/client.py", line 241, in _internal_call
    timeout=self.requests_timeout, **args
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 723, in urlopen
    retries.sleep(response)
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 277, in sleep
    slept = self.sleep_for_retry(response)
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 256, in sleep_for_retry
    time.sleep(retry_after)
KeyboardInterrupt

timeout

hi @foobuzz

i kinda love you but ive got a lot of issues while running ✨ statify ✨

a cron is running every other hour but sometimes fails due to a classical timeout, so what about increasing it a bit?

i didnt bother looking into how to do that in spotipy but please do it as soon as possible thx

edit: ok actually i took a look and it seems pretty straigthforward spotipy-dev/spotipy#116 (comment) (but still too lazy to do the PR)

xoxo

Traceback (most recent call last):
  File "/home/pi/.local/bin/statify", line 10, in <module>
    sys.exit(main())
  File "/home/pi/.local/lib/python3.7/site-packages/statify/statify.py", line 36, in main
    code = _main(args)
  File "/home/pi/.local/lib/python3.7/site-packages/statify/statify.py", line 100, in _main
    pull_playlists(spotify, database)
  File "/home/pi/.local/lib/python3.7/site-packages/statify/statify.py", line 171, in pull_playlists
    spotify_tracks = list(spotify.playlist_tracks(playlist_obj.spotify_id))
  File "/home/pi/.local/lib/python3.7/site-packages/statify/spotify_client.py", line 125, in playlist_tracks
    page_size=100,  # Max allowed
  File "/home/pi/.local/lib/python3.7/site-packages/statify/spotify_client.py", line 80, in _paginate_spotipy_method
    **kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/spotipy/client.py", line 634, in playlist_tracks
    market, additional_types)
  File "/home/pi/.local/lib/python3.7/site-packages/spotipy/client.py", line 663, in playlist_items
    additional_types=",".join(additional_types)
  File "/home/pi/.local/lib/python3.7/site-packages/spotipy/client.py", line 284, in _get
    return self._internal_call("GET", url, payload, kwargs)
  File "/home/pi/.local/lib/python3.7/site-packages/spotipy/client.py", line 241, in _internal_call
    timeout=self.requests_timeout, **args
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 529, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.spotify.com', port=443): Read timed out. (read timeout=5)

null track cause boom boom

hi @foobuzz i've a new error for you

Traceback (most recent call last):
  File "/home/pi/.local/bin/statify", line 10, in <module>
    sys.exit(main())
  File "/home/pi/.local/lib/python3.7/site-packages/statify/statify.py", line 36, in
    code = _main(args)
  File "/home/pi/.local/lib/python3.7/site-packages/statify/statify.py", line 100, in
    pull_playlists(spotify, database)
  File "/home/pi/.local/lib/python3.7/site-packages/statify/statify.py", line 171, in
    spotify_tracks = list(spotify.playlist_tracks(playlist_obj.spotify_id))
  File "/home/pi/.local/lib/python3.7/site-packages/statify/spotify_client.py", line
    p_track['track'] = self.track_transformer(p_track['track'])
  File "/home/pi/.local/lib/python3.7/site-packages/statify/statify.py", line 145, in
    if resource['id'] is None and resource['is_local']:
TypeError: 'NoneType' object is not subscriptable

i added a print somewhere and after dumping a lot of stuff, it happened:

{'added_at': '2021-05-06T22:15:57Z', 'added_by': {'external_urls': {'spotify': 'https://open.spotify.com/user/'}, 'href': 'https://api.spotify.com/v1/users/', 'id': '', 'type': 'user', 'uri': 'spotify:user:'}, 'is_local': False, 'primary_color': None, 'track': None, 'video_thumbnail': {'url': None}}

so after a huge amount of reverse engineering and using the web ui of github i'll make a pr in the next few minutes, stay tuned

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.