-
Notifications
You must be signed in to change notification settings - Fork 2
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
Crash when attempting to open 'Query Hydrus' menu #34
Comments
Not sure if this is something that would help as I am a little out of my depth here but doing a quick search on the internet led me to this: Particularly this answer seems like a simple solution to the problem: Hopefully this can help someone here... |
Looks like at a glance that the Hydrus API has changed in a way that Hatate has not yet been updated to handle. The technical details are simple: Hatate is trying to retrieve a list of what Hydrus calls services, like your "local files" service or "local files" service that house your data. It used to provide them directly in the query that Hatate is performing, but now it's provided as an array of children in the result. I get the same problem on ver538, though I'm not sure specifically when the API change happened. I worked around it by updating the code on my copy on HydrusQuery.xaml.cs#146. foreach (var item in services) {
string key = (string)item.Key;
- JArray jArray = (JArray)item.Value;
+ IEnumerable<JObject> jArray = item.Value.Children<JObject>(); It might be more work for @nostrenz though if they want to support the older API scheme as well as the new one in the same build. I might submit a PR if I get the time and inclination to do so. |
Hi! As you can see I was a little short on time to work on Hatate lastly. Sorry for the long wait, however I do appreciate those bug reports, so thanks for helping fixing/improving Hatate! |
Hatate repeatedly crashes when attempting to open the 'Query Hydrus' menu.
Immediately when I click on the menu point, hatate crashes into the ground.
Have tried installing older hatate versions.
Have tried re-installing hatate.
Have tried restarting both hatate and hydrus.
Have not yet tried generating a new/different api key for hatate.
Yes, I have made sure the api key is correct.
It works when sending hatate found/and tagged files to hydrus.
It is only this one menu item that does not work, and this would be really important for my uses, as I have a lot of files I want to tag and having to go trough and add every single one of the 256 folders hydrus makes is not only an inefficient use of time, but also a waste of resources, as I'm importing a lot of files which are already tagged
The following log has been translated by deepL, as for some unbeknownst reason, the logs were printed in my computers native language, which is not english.
Crash Log
System.Windows.Threading.DispatcherUnhandledExceptionEventArgsThe object cannot be converted from "Newtonsoft.Json.Linq.JObject" to "Newtonsoft.Json.Linq.JArray".
Hatate
System.Collections.ListDictionaryInternal
System.InvalidCastException: Object cannot be converted from type "Newtonsoft.Json.Linq.JObject" to type "Newtonsoft.Json.Linq.JArray".
in the following location: Hatate.HydrusQuery.d__7.MoveNext()
--- End of stack trace from the previous occurrence of the exception ---
in the following location: System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_0(Object state)
in the following location: System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
in the following location: System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
in the following location: Hatate.HydrusQuery.d__7.MoveNext()
--- End of stack trace from the previous occurrence of the exception ---
at the next location: System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_0(Object state)
in the following location: System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
in the following location: System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
The text was updated successfully, but these errors were encountered: