Coder Social home page Coder Social logo

novatorem / novatorem Goto Github PK

View Code? Open in Web Editor NEW
605.0 3.0 2.3K 3.06 MB

Dynamic realtime profile ReadMe linked with spotify

Home Page: https://novac.dev

License: The Unlicense

Python 48.65% Jinja 50.50% Dockerfile 0.72% Procfile 0.13%
readme spotify

novatorem's Introduction

novatorem's People

Contributors

alexandrosalexiou avatar ethan-s-dev avatar johnpc avatar khroners avatar lizzykerrigan avatar novatorem avatar t0biii 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

novatorem's Issues

[DOC Update Request] Update Setup.md

Embedding links in the md file to redirect to the line of code in spotify.html.j2

Screenshot 2023-01-29 222222

  • while following the steps, it took me a while to remove the comment tag from the above mentioned lines of code because the exact location of the lines are not mentioned clearly in the documentation.

Can i create a pull request that fixes this issue in Setup.md ?

404: NOT_FOUND

Hi Novatorem,

I encountered a 404 error after clicking into the API folder of the deployment instance on Vercel. Can you tell what I did wrong here? It seems like the function is not being run at all. I followed the YouTube tutorial and debug process, but I can't seem to find anything wrong. Thank you so much for helping.

image

image

docker compose up Windows 10 issue

I'm on windows 10 and I run docker compose up and I get the following error:

 > [1/5] FROM docker.io/library/python:3.10.0@sha256:a1fba384d3aa879533a271ab5d73965fbd3385648f38835dacd07e519f1c7c3f:
------
failed to solve: rpc error: code = Unknown desc = failed commit on ref "layer-sha256:83098237b6d3febc7584c1f16076a32ac01def85b0d220ab46b6ebb2d6e7d4d4": "layer-sha256:83098237b6d3febc7584c1f16076a32ac01def85b0d220ab46b6ebb2d6e7d4d4" failed size validation: 8415611 != 196499409: failed precondition

docs

is there any docs available to host our own ??

EQ bar Android system

The equalizer bar does not appear on Android system.

Web only!

I believe it should be configured in the app.json file..

Suggestion to include the EQ bar in the Android system.

Potential error on "Setup.md" by misspelling.

So, recently, while following the Setup.md tutorial, I came across a similar error in certain points within the tutorial:

The error consists in the Redirect URI, being written as: http://localhost/callback/. There is an misspelling in the url: an missing "s" to the Hypertext Transfer Protocol Secure (HTTPS).

This error can be encountered by several parts after the Redirect URI, such as in the Refresh Token, and in the run of the curl comand:
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Basic {BASE64}" -d "grant_type=authorization_code&redirect_uri=http://localhost/callback/&code={CODE}" https://accounts.spotify.com/api/token.

This causes progress to be impeded at points where the Redirect URI needs to be used.
By making the correction after discovering this error, I was able to finish it successfuly.

So maybe this could be a misspelling that might be getting in the way of other users problaby?
Or maybe i'm the only one that had this problem?

I open this issue, as it maybe can be for help to point a potential error.

Thanks for the attention.

docs

is there any docs available to host our own ??

Internal Server Error

https://cmmon.vercel.app/api/spotify

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

Cross-checked the refresh token, Client Code and Secret, no error there.

Error when playing episodes/podcast

I am currently playing Brown Noise
image

and it cannot show podcasts/episodes (this is my GitHub readme screenshot)
image

it says, Internal Server Error
image

Support for longer song titles

Long song title

When the song title wraps and becomes two lines long, the bars remain in the same place and obscure the artist text. It would be great if the bars weren't absolutely positioned for when the text wraps, if it's possible to manage that while keeping the same look for the project.

Love your work so far, keep it up! Cheers.

Error 404 when loading the Vercel Site

I will let this screenshot explain itself, as I did everything correctly up to this step, as well as when clicking the blue Spotify link on my README, it goes to my profile, but it doesn’t show anything but either a huge box with the blue Spotify link, or a box for just the size of the same thing. Here is a screenshot of the Vercel Page.

A16B6948-ECCE-498B-A611-07E4C678AFE7

Also, I get this when typing the /api/spotify.py part
DDB22A17-B338-45F0-8B1E-A0942FC68FA6

Cool App! Current bug `Unable to import module 'vc__handler__python'`

Current vercel bug:

image

[GET] /api/spotify
11:09:23:22
[ERROR] Runtime.ImportModuleError: Unable to import module 'vc__handler__python': cannot import name 'escape' from 'jinja2' (/var/task/jinja2/__init__.py)
Traceback (most recent call last):

Might take a look at trying to fix this, thanks for the setup instructions with links! I have a feeling it's 90% working but I'm just missing some package definitions. If I make a fix I'll throw a PR this way.

Vercel won't let me import this forked repo

I followed every step and I'm stuck at deploying the project on Vercel.
When I try to import my forked repo, it always say :

Expected "github" | "gitlab" | "bitbucket" at gitRepository.type but instead got "undefined".

Idk why I searched everywhere but can't find anything usefull.

spotify music

Hi....i need help...
why spotify is not working in my profile....i did everything according to setup.md...
but i am not understanding why its not working...
if anyone give me solution ....it will be so much helpful for me...
thank you

error when there's no recent played songs

when a user has no recent played songs, recentPlays["items"] is an empty list
therefore random.randint(0, 0 - 1) raises ValueError: empty range for randrange() (0, 0, 0)

recentPlays = recentlyPlayed()
recentPlaysLength = len(recentPlays["items"])
itemIndex = random.randint(0, recentPlaysLength - 1)

Some extra logic could be added to display a blank (default) card when this occurs.

[FEATURE REQUEST] Mention Now Playing or Recently Played

I noticed that when I wasn't playing any song, it just picked up a recently played song from my account. Currently there is no way to know whether the person is actually listening to the song right now or its just something they recently played.
Maybe an icon/text can be added to specify whether the song is Currently playing or recently played.

error": "invalid_grant", "error_description": "Invalid refresh token

After following all the guide and still not working so I decided to check the vercel function to see the log error and am seeing this so am lost

`{"error": "invalid_grant", "error_description": "Invalid refresh token"}

{"error": "invalid_grant", "error_description": "Invalid refresh token"}

[ERROR] 2023-10-21T20:13:14.633Z cb4210d1-4ca2-4b04-a006-eb20b003314e Exception on /api/spotify [GET]
Traceback (most recent call last):
File "./api/spotify.py", line 52, in refreshToken
return response["access_token"]
KeyError: 'access_token'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "./api/spotify.py", line 174, in catch_all
data = get(NOW_PLAYING_URL)
File "./api/spotify.py", line 63, in get
SPOTIFY_TOKEN = refreshToken()
File "./api/spotify.py", line 56, in refreshToken
raise KeyError(str(response))
KeyError: "{'error': 'invalid_grant', 'error_description': 'Invalid refresh token'}"`

Missing Step in Setup readme.

Hello!

I was trying to add this to my profile, and under the Vercel section, I think it should be said you need to fork your repo. I needed to find a video of someone else adding it to their profile to figure out what I was doing wrong.

What is the Username ?

[![Spotify](https://USER_NAME.vercel.app/api/spotify)](https://open.spotify.com/user/USER_NAME)

If the Username here is Spotify's Username what is the need for deployment on Vercel?

I'm new to coding I may sound silly.

I have done all the steps shown in the Guide but I'm not able to integrate please help !!!

item["album"]["images"] array can be empty causing index out of range error

If there is no image associated with a song (if the user is playing local songs from there device for example) then no SVG will be produced. This is due to an index out of bounds error raised in line 105. The "image" array can be empty and should be checked before calling the loadImageB64() function.

A placeholder image should probably be used in the case of the "image" array being empty

How to serve on local

I wanna play around with the templates. But I can't host it on my local machine. I wanted to run it on my local machine.
I tried cmds like:

set FLASK_APP=spotify
set FLASK_ENV=development
flask run

but when I go to localhost:5000/api/spotify I get flask.cli.NoAppException flask.cli.NoAppException: Could not import "spotify".

BTW I am not familiar with flask. I just took it out of flask docs.

Got error curling link

I have been getting the same error every time I try to curl the specified link. I get this error. {"error":"invalid_client","error_description":"Invalid client secret"}% . I have followed the steps up until now. (I don't know if this effects it but I am using terminal so idk.)

Getting an internal server error on my deployed app

Hey, I've followed every step from the SetUp.md (for the 3rd time now) and I'm getting 500 on my app:
novatorem.theonlyartz.vercel.app/api/spotify

build logs (although it looks just fine):

16:35:01.421  	Cloning github.com/TheOnlyArtz/novatorem (Branch: master, Commit: 7eebe7e)
16:35:01.982  	Cloning completed in 561ms
16:35:01.983  	Analyzing source code...
16:35:02.699  	Uploading build outputs...
16:35:04.176  	Installing build runtime...
16:35:05.761  	Build runtime installed: 1584.990ms
16:35:06.510  	Installing required dependencies...
16:35:10.054  	Uploading build outputs...
16:35:12.872  	Done with "api/spotify.py"

Any ideas?

500 error when podcast playing

Hey! Love this script so far, but noticed there's an issue when playing podcasts - in the makeSVG() function, item is assigned to data["item"], but this comes back as None when a podcast is currently playing. This can be fixed by changing the conditional to this:

if data == {} or data["item"] == None:

I'm not sure if podcast playing information can be obtained, but for the time being, I'd be happy to open a PR to fix this if you like? Just so that the recentPlays info is returned instead of a 500 error 🙂

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.