Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Get CouchPotato Quality Profiles #321

Closed
Undeadllama opened this issue Jun 14, 2016 · 2 comments
Closed

Unable to Get CouchPotato Quality Profiles #321

Undeadllama opened this issue Jun 14, 2016 · 2 comments

Comments

@Undeadllama
Copy link

Undeadllama commented Jun 14, 2016

Plex Requests.Net Version:

1.7.5

Operating System:

Windows Server 2012 R2

Mono Version:

Where do I find this? I see this in the top of the logs:
PlexRequests.UI.Program Info: This is not Mono

Applicable Logs (from /logs/ directory or the Admin page):

2016/06/14 18:53:29.549 PlexRequests.Api.ApiRequest Trace: {"list": [{"core": 1, "_rev": "000a111b", "finish": [1], "hide": false, "_id": "340f2d2e7f214fc4b387b6b53de7bf7e", "_t": "profile", "label": "1080P", "qualities": ["1080p"], "wait_for": [null], "order": 0}, {"core": 1, "_rev": "000ab93d", "finish": [1], "hide": false, "_id": "f8b37d6cb57e474c9c437d26860a3c41", "_t": "profile", "label": "720P", "qualities": ["720p"], "wait_for": [null], "order": 1}, {"core": false, "_rev": "0014119a", "finish": [true, true, true, true], "hide": false, "qualities": ["1080p", "720p", "dvdrip", "dvdr"], "_id": "fd023af9837d4b29b80aeea4f96052fa", "_t": "profile", "label": "HD? No? Okay, try DVD", "minimum_score": 20, "stop_after": [21, 21, 21, 21], "wait_for": [14, 14, 14, 14], "order": 2, "3d": [0, 0, 0, 0]}, {"core": true, "_rev": "000bc3fb", "finish": [true], "hide": false, "_id": "098dce9ff6f4431699c88acb9e145520", "_t": "profile", "label": "BR-Disk", "qualities": ["bd50"], "wait_for": [0], "order": 3}, {"core": true, "_rev": "000b9966", "finish": [true], "hide": true, "_id": "5922a5f0d11d4c81bf8c1e72fc98e301", "_t": "profile", "label": "BR-Rip", "qualities": ["brrip"], "wait_for": [0], "order": 4}, {"core": true, "_rev": "000b1052", "finish": [true], "hide": true, "_id": "3abe282a77714b8f9ba9abcc2c589573", "_t": "profile", "label": "DVD-R", "qualities": ["dvdr"], "wait_for": [0], "order": 5}, {"core": true, "_rev": "000b0dc4", "finish": [true], "hide": false, "_id": "aa0d38c0d75f48c2bc74a306debad8ca", "_t": "profile", "label": "DVD-Rip", "qualities": ["dvdrip"], "wait_for": [0], "order": 6}, {"core": true, "_rev": "000bf5fd", "finish": [true], "hide": true, "_id": "7739d097e0924e29a375ffae3d18df89", "_t": "profile", "label": "Screener", "qualities": ["scr"], "wait_for": [0], "order": 7}, {"core": true, "_rev": "000bcb8d", "finish": [true], "hide": true, "_id": "f935334517dd4c159f05d874e6f3e2a6", "_t": "profile", "label": "R5", "qualities": ["r5"], "wait_for": [0], "order": 8}, {"core": true, "_rev": "000b77b5", "finish": [true], "hide": true, "_id": "330e4a3788514ed0a6c55379df81b7de", "_t": "profile", "label": "TeleCine", "qualities": ["tc"], "wait_for": [0], "order": 9}, {"core": true, "_rev": "000b5b59", "finish": [true], "hide": true, "_id": "d3a0a14e70ec4f849868550b893f9576", "_t": "profile", "label": "TeleSync", "qualities": ["ts"], "wait_for": [0], "order": 10}, {"core": true, "_rev": "000b760c", "finish": [true], "hide": true, "_id": "a66449dba4174f429caddc21b3d64d42", "_t": "profile", "label": "Cam", "qualities": ["cam"], "wait_for": [0], "order": 11}, {"core": true, "_rev": "00099b92", "finish": [true], "hide": false, "_id": "97f9f07541454f438eea9f705aec9307", "_t": "profile", "label": "1080p", "qualities": ["1080p"], "wait_for": [0], "order": 12}, {"core": true, "_rev": "0009e99d", "finish": [true], "hide": false, "_id": "fa9aef80185f4b118c2857a0bfc531ce", "_t": "profile", "label": "720p", "qualities": ["720p"], "wait_for": [0], "order": 13}, {"core": false, "_rev": "00099bfa", "finish": [true, true, true], "minimum_score": 1, "_id": "c4bbf251de2446b08effa3d5e4aad1c0", "_t": "profile", "label": "3D", "qualities": ["1080p", "bd50", ""], "stop_after": [0, 0, 0], "wait_for": [0, 0, 0], "order": 999, "3d": [1, 1, 0]}], "success": true} 
2016/06/14 18:53:29.549 PlexRequests.Api.ApiRequest Error: System.InvalidCastException: Null object cannot be converted to a value type.
   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   at RestSharp.Deserializers.JsonDeserializer.ConvertValue(Type type, Object value)
   at RestSharp.Deserializers.JsonDeserializer.BuildList(Type type, Object parent)
   at RestSharp.Deserializers.JsonDeserializer.ConvertValue(Type type, Object value)
   at RestSharp.Deserializers.JsonDeserializer.Map(Object target, IDictionary`2 data)
   at RestSharp.Deserializers.JsonDeserializer.CreateAndMap(Type type, Object element)
   at RestSharp.Deserializers.JsonDeserializer.ConvertValue(Type type, Object value)
   at RestSharp.Deserializers.JsonDeserializer.BuildList(Type type, Object parent)
   at RestSharp.Deserializers.JsonDeserializer.ConvertValue(Type type, Object value)
   at RestSharp.Deserializers.JsonDeserializer.Map(Object target, IDictionary`2 data)
   at RestSharp.Deserializers.JsonDeserializer.CreateAndMap(Type type, Object element)
   at RestSharp.Deserializers.JsonDeserializer.ConvertValue(Type type, Object value)
   at RestSharp.Deserializers.JsonDeserializer.Deserialize[T](IRestResponse response)
   at RestSharp.RestClient.Deserialize[T](IRestRequest request, IRestResponse raw) System.InvalidCastException: Null object cannot be converted to a value type.
   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   at RestSharp.Deserializers.JsonDeserializer.ConvertValue(Type type, Object value)
   at RestSharp.Deserializers.JsonDeserializer.BuildList(Type type, Object parent)
   at RestSharp.Deserializers.JsonDeserializer.ConvertValue(Type type, Object value)
   at RestSharp.Deserializers.JsonDeserializer.Map(Object target, IDictionary`2 data)
   at RestSharp.Deserializers.JsonDeserializer.CreateAndMap(Type type, Object element)
   at RestSharp.Deserializers.JsonDeserializer.ConvertValue(Type type, Object value)
   at RestSharp.Deserializers.JsonDeserializer.BuildList(Type type, Object parent)
   at RestSharp.Deserializers.JsonDeserializer.ConvertValue(Type type, Object value)
   at RestSharp.Deserializers.JsonDeserializer.Map(Object target, IDictionary`2 data)
   at RestSharp.Deserializers.JsonDeserializer.CreateAndMap(Type type, Object element)
   at RestSharp.Deserializers.JsonDeserializer.ConvertValue(Type type, Object value)
   at RestSharp.Deserializers.JsonDeserializer.Deserialize[T](IRestResponse response)
   at RestSharp.RestClient.Deserialize[T](IRestRequest request, IRestResponse raw)
2016/06/14 18:53:29.549 PlexRequests.Api.CouchPotatoApi Error: Exception when calling GetProfiles for CP, Retrying 00:00:10 PlexRequests.Helpers.Exceptions.ApiRequestException: Error retrieving response. Check inner details for more info. ---> System.InvalidCastException: Null object cannot be converted to a value type.
   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   at RestSharp.Deserializers.JsonDeserializer.ConvertValue(Type type, Object value)
   at RestSharp.Deserializers.JsonDeserializer.BuildList(Type type, Object parent)
   at RestSharp.Deserializers.JsonDeserializer.ConvertValue(Type type, Object value)
   at RestSharp.Deserializers.JsonDeserializer.Map(Object target, IDictionary`2 data)
   at RestSharp.Deserializers.JsonDeserializer.CreateAndMap(Type type, Object element)
   at RestSharp.Deserializers.JsonDeserializer.ConvertValue(Type type, Object value)
   at RestSharp.Deserializers.JsonDeserializer.BuildList(Type type, Object parent)
   at RestSharp.Deserializers.JsonDeserializer.ConvertValue(Type type, Object value)
   at RestSharp.Deserializers.JsonDeserializer.Map(Object target, IDictionary`2 data)
   at RestSharp.Deserializers.JsonDeserializer.CreateAndMap(Type type, Object element)
   at RestSharp.Deserializers.JsonDeserializer.ConvertValue(Type type, Object value)
   at RestSharp.Deserializers.JsonDeserializer.Deserialize[T](IRestResponse response)
   at RestSharp.RestClient.Deserialize[T](IRestRequest request, IRestResponse raw)
   --- End of inner exception stack trace ---
   at PlexRequests.Api.ApiRequest.Execute[T](IRestRequest request, Uri baseUri) in C:\projects\requestplex\PlexRequests.Api\ApiRequest.cs:line 70
   at PlexRequests.Api.CouchPotatoApi.<>c__DisplayClass8_0.<GetProfiles>b__0() in C:\projects\requestplex\PlexRequests.Api\CouchPotatoApi.cs:line 129
   at Polly.Policy.<>c__DisplayClass8_0`1.<Execute>b__0()
   at Polly.Retry.RetryEngine.Implementation(Action action, IEnumerable`1 shouldRetryPredicates, Func`1 policyStateFactory)
2016/06/14 18:53:36.269 PlexRequests.Api.ApiRequest Trace: Api Content Response: 
2016/06/14 18:53:36.269 PlexRequests.Api.ApiRequest Trace: {"list": [{"core": 1, "_rev": "000a111b", "finish": [1], "hide": false, "_id": "340f2d2e7f214fc4b387b6b53de7bf7e", "_t": "profile", "label": "1080P", "qualities": ["1080p"], "wait_for": [null], "order": 0}, {"core": 1, "_rev": "000ab93d", "finish": [1], "hide": false, "_id": "f8b37d6cb57e474c9c437d26860a3c41", "_t": "profile", "label": "720P", "qualities": ["720p"], "wait_for": [null], "order": 1}, {"core": false, "_rev": "0014119a", "finish": [true, true, true, true], "hide": false, "qualities": ["1080p", "720p", "dvdrip", "dvdr"], "_id": "fd023af9837d4b29b80aeea4f96052fa", "_t": "profile", "label": "HD? No? Okay, try DVD", "minimum_score": 20, "stop_after": [21, 21, 21, 21], "wait_for": [14, 14, 14, 14], "order": 2, "3d": [0, 0, 0, 0]}, {"core": true, "_rev": "000bc3fb", "finish": [true], "hide": false, "_id": "098dce9ff6f4431699c88acb9e145520", "_t": "profile", "label": "BR-Disk", "qualities": ["bd50"], "wait_for": [0], "order": 3}, {"core": true, "_rev": "000b9966", "finish": [true], "hide": true, "_id": "5922a5f0d11d4c81bf8c1e72fc98e301", "_t": "profile", "label": "BR-Rip", "qualities": ["brrip"], "wait_for": [0], "order": 4}, {"core": true, "_rev": "000b1052", "finish": [true], "hide": true, "_id": "3abe282a77714b8f9ba9abcc2c589573", "_t": "profile", "label": "DVD-R", "qualities": ["dvdr"], "wait_for": [0], "order": 5}, {"core": true, "_rev": "000b0dc4", "finish": [true], "hide": false, "_id": "aa0d38c0d75f48c2bc74a306debad8ca", "_t": "profile", "label": "DVD-Rip", "qualities": ["dvdrip"], "wait_for": [0], "order": 6}, {"core": true, "_rev": "000bf5fd", "finish": [true], "hide": true, "_id": "7739d097e0924e29a375ffae3d18df89", "_t": "profile", "label": "Screener", "qualities": ["scr"], "wait_for": [0], "order": 7}, {"core": true, "_rev": "000bcb8d", "finish": [true], "hide": true, "_id": "f935334517dd4c159f05d874e6f3e2a6", "_t": "profile", "label": "R5", "qualities": ["r5"], "wait_for": [0], "order": 8}, {"core": true, "_rev": "000b77b5", "finish": [true], "hide": true, "_id": "330e4a3788514ed0a6c55379df81b7de", "_t": "profile", "label": "TeleCine", "qualities": ["tc"], "wait_for": [0], "order": 9}, {"core": true, "_rev": "000b5b59", "finish": [true], "hide": true, "_id": "d3a0a14e70ec4f849868550b893f9576", "_t": "profile", "label": "TeleSync", "qualities": ["ts"], "wait_for": [0], "order": 10}, {"core": true, "_rev": "000b760c", "finish": [true], "hide": true, "_id": "a66449dba4174f429caddc21b3d64d42", "_t": "profile", "label": "Cam", "qualities": ["cam"], "wait_for": [0], "order": 11}, {"core": true, "_rev": "00099b92", "finish": [true], "hide": false, "_id": "97f9f07541454f438eea9f705aec9307", "_t": "profile", "label": "1080p", "qualities": ["1080p"], "wait_for": [0], "order": 12}, {"core": true, "_rev": "0009e99d", "finish": [true], "hide": false, "_id": "fa9aef80185f4b118c2857a0bfc531ce", "_t": "profile", "label": "720p", "qualities": ["720p"], "wait_for": [0], "order": 13}, {"core": false, "_rev": "00099bfa", "finish": [true, true, true], "minimum_score": 1, "_id": "c4bbf251de2446b08effa3d5e4aad1c0", "_t": "profile", "label": "3D", "qualities": ["1080p", "bd50", ""], "stop_after": [0, 0, 0], "wait_for": [0, 0, 0], "order": 999, "3d": [1, 1, 0]}], "success": true} 

Reproduction Steps:

Admin > CouchPotato > Get Quality Profiles

After a few seconds wait a floating, red "Something went wrong!" error appears in the top right corner of the screen and no quality profiles are filled in the drop down menu.

Testing connectivity to CouchPotato is successful however.

Current CouchPotato Settings:

Enabled: yes
CouchPotato Hostname or IP: 192.168.1.100
Port: 5050
SSL: No
SubDirectory:

@Undeadllama
Copy link
Author

I'm no programmer so feel free to tell me I'm spouting rubbish... but could the null value the logs speak of be the empty double quotes at the end of the following snippet?

qualities": ["1080p", "bd50", ""]

I tried adding a third quality to this quality profile in CouchPotato but then had this instead:

qualities": ["1080p", "bd50", "720p", ""]

Resulting in the same error in PlexRequests...

@tidusjar
Copy link
Member

It was in a different part of the response, what you have shown will equal to an empty string.

This has already been fixed in the dev build. We are just finalizing a few things before we can release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants