airdrummingfool / genius-lyrics Goto Github PK
View Code? Open in Web Editor NEWThis project forked from robert-alfaro/genius-lyrics
Home Assistant custom component for fetching lyrics from Genius
This project forked from robert-alfaro/genius-lyrics
Home Assistant custom component for fetching lyrics from Genius
Service call:
{
"api_key":"[redacted]",
"artist_name":"EMBRZ, Leo Stannard",
"song_title":"She Won't Let Me Down (feat. Leo Stannard)",
"entity_id":"sensor.lyrics"
}
Error:
Sat Aug 17 2019 23:15:08 GMT-0500 (Central Daylight Time)
Error while executing automation automation.misc_update_genius_lyrics_when_spotify_song_changes. Unknown error for call_service at pos 1:
Traceback (most recent call last):
File "/usr/src/app/homeassistant/components/automation/__init__.py", line 427, in action
await script_obj.async_run(variables, context)
File "/usr/src/app/homeassistant/helpers/script.py", line 151, in async_run
await self._handle_action(action, variables, context)
File "/usr/src/app/homeassistant/helpers/script.py", line 235, in _handle_action
await self._actions[_determine_action(action)](action, variables, context)
File "/usr/src/app/homeassistant/helpers/script.py", line 318, in _async_call_service
context=context,
File "/usr/src/app/homeassistant/helpers/service.py", line 97, in async_call_from_config
domain, service_name, service_data, blocking=blocking, context=context
File "/usr/src/app/homeassistant/core.py", line 1235, in async_call
await asyncio.shield(self._execute_service(handler, service_call))
File "/usr/src/app/homeassistant/core.py", line 1262, in _execute_service
await self._hass.async_add_executor_job(handler.func, service_call)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/genius_lyrics/__init__.py", line 51, in search_lyrics
attrs = song.to_dict()
AttributeError: 'NoneType' object has no attribute 'to_dict'
Right now the API key must be passed in each service call. This should instead be part of the configuration.yaml
settings, so we can (e.g.) pull from secrets.yaml
.
2019-08-21 05:37:49 DEBUG (SyncWorker_1) [custom_components.genius_lyrics] Searching for lyrics with artist 'Yellowcard' and title 'Lights And Sounds'
2019-08-21 05:37:51 DEBUG (SyncWorker_1) [custom_components.genius_lyrics] Song data:
{'title': 'This is Bilgewater', [...]}
Worth noting that searching on Genius shows the correct song as "Top Result", but the incorrect song as the first "Lyric match":
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.