tuxfoo / jellyfin-skill

This skill allows audio playback from a Jellyfin server
Other
8 stars 4 forks source link

item types with same name sometimes result in error. #16

Open cooljimy84 opened 3 years ago

cooljimy84 commented 3 years ago

I get this from the mycroft logs when it errors.

2021-09-24 10:52:08.938 | INFO | 18133 | Playback Control Skill | Resolving Player for: goldfinger fatal: Not a git repository (or any of the parent directories): .git 2021-09-24 10:52:10.614 | INFO | 18133 | jellyfin-skill_tuxfoo.jellyfin_croft | Failed to determine version with error: Command '['git', 'describe', '--always']' returned non-zero exit status 128. 2021-09-24 10:52:10.721 | INFO | 18133 | Jellyfin | The Phrase: 2021-09-24 10:52:10.721 | INFO | 18133 | Jellyfin | goldfinger 2021-09-24 10:52:10.722 | INFO | 18133 | root | phrase: goldfinger 2021-09-24 10:52:10.948 | ERROR | 18133 | mycroft.skills.mycroft_skill.mycroft_skill:on_error:923 | An error occurred while processing a request in Jellyfin Traceback (most recent call last): File "/opt/venvs/mycroft-core/lib/python3.7/site-packages/mycroft/skills/mycroft_skill/event_container.py", line 73, in wrapper handler(message) File "/opt/venvs/mycroft-core/lib/python3.7/site-packages/mycroft/skills/common_play_skill.py", line 97, in handle_play_query result = self.CPS_match_query_phrase(search_phrase) File "/opt/mycroft/skills/jellyfin-skill.tuxfoo/init.py", line 131, in CPS_match_query_phrase match_type, songs = self.jellyfin_croft.parse_common_phrase(phrase) File "/opt/mycroft/skills/jellyfin-skill.tuxfoo/jellyfin_croft.py", line 287, in parse_common_phrase results = self.search(phrase, include_media_types) File "/opt/mycroft/skills/jellyfin-skill.tuxfoo/jellyfin_croft.py", line 150, in search search_items = JellyfinCroft.parse_search_hints_from_response(response) File "/opt/mycroft/skills/jellyfin-skill.tuxfoo/jellyfin_croft.py", line 232, in parse_search_hints_from_response response_json = response.json() File "/opt/venvs/mycroft-core/lib/python3.7/site-packages/requests/models.py", line 900, in json return complexjson.loads(self.text, **kwargs) File "/opt/python/lib/python3.7/json/init__.py", line 348, in loads return _default_decoder.decode(s) File "/opt/python/lib/python3.7/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/opt/python/lib/python3.7/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 2021-09-24 10:52:16.563 | INFO | 18133 | Playback Control Skill | No matches

and this on the Jellyfin 10.7.0 side

[2021-09-24 11:52:10.702 +01:00] [INF] Authentication request for "jellyfin" has succeeded. [2021-09-24 11:52:10.702 +01:00] [INF] Current/Max sessions for user "jellyfin": 3/0 [2021-09-24 11:52:10.703 +01:00] [INF] Reissuing access token: "01048645b4b04e2eb5065c483ad0d787" [2021-09-24 11:52:10.877 +01:00] [ERR] Error processing request. URL "GET" "/Search/Hints". System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index') at System.SZArrayHelper.get_Item[T](Int32 index) at Jellyfin.Api.Controllers.SearchController.GetSearchHintResult(SearchHintInfo hintInfo) at System.Linq.Enumerable.SelectListIterator2.ToArray() at Jellyfin.Api.Controllers.SearchController.Get(Nullable1 startIndex, Nullable1 limit, Nullable1 userId, String searchTerm, String[] includeItemTypes, String[] excludeItemTypes, String[] mediaTypes, Nullable1 parentId, Nullable1 isMovie, Nullable1 isSeries, Nullable1 isNews, Nullable1 isKids, Nullable1 isSports, Boolean includePeople, Boolean includeMedia, Boolean includeGenres, Boolean includeStudios, Boolean includeArtists) at lambda_method1489(Closure , Object , Object[] ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync() at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.gAwaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Routing.EndpointMiddleware.gAwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at Jellyfin.Server.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager) at Jellyfin.Server.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager) at Jellyfin.Server.Middleware.IpBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager) at Jellyfin.Server.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager) at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Jellyfin.Server.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext) at Jellyfin.Server.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.Invoke(HttpContext context) at Jellyfin.Server.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context) at Jellyfin.Server.Middleware.ExceptionMiddleware.Invoke(HttpContext context)

So i have tracks, ablums and an artist called goldfinger.

Sorry about the formatting, i can attach files if you would rather.

tuxfoo commented 3 years ago

Thanks for the feedback.

I have not used Mycroft in a while, I still used Jellyfin a lot. I just ordered Respeaker 4 mic array hat for raspberry pi so that might motivate me to do some more work on the Jellyfin skill once it arrives.

I will have to automate some testing to catch things like this.

cooljimy84 commented 3 years ago

Kool, it seems to only happen when there are artists or albums with that name, rather than a track. Tho not 100%