garulf / flox Goto Github PK
View Code? Open in Web Editor NEWHelper library for Wox & Flow Launcher
License: MIT License
Helper library for Wox & Flow Launcher
License: MIT License
Getting this error with FlowLauncher when using the latest version of Flox (doesn't happen with 0.10):
Flow Launcher version: 1.9.3
OS Version: Microsoft Windows NT 10.0.19043.0
IntPtr Length: 8
x64: True
Python Path:
Date: 04/16/2022 22:44:41
Exception:
System.IO.InvalidDataException: Spell Checker|Empty JSONRPC Response
at Flow.Launcher.Core.Plugin.JsonRPCPlugin.ExecuteAsync(ProcessStartInfo startInfo, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 308
Flow Launcher is installed with scoop folder name is Flow-Launcher
, with a dash and not a space. This make Flox crash on import.
OS:Windows 10
Python Version: 3.11
Flox Version : 0.19.3
When I was developing the plug-in for Flow Launcher, there was an error reading Setting.json
Erro: UnicodeDecodeError: 'xxx' codec can't decode byte 0xae in position 170: illegal multibyte sequence
The system default encoding cannot open utf-8.
flox/init_.py line 213 - 214:
with open(os.path.join(self.plugindir, PLUGIN_MANIFEST), 'r') as f:
return json.load(f)
I need to change my Setting.json to system default encoding ,To solve this problem.
Maybe you can add an encoding parameter to the error location,
I started playing with FlowLauncher today and found your library, and could not understand what's wrong. So after some experiments I found out that it's crashing when using version 0.20.0 and not crashing with any older version (0.19.6 included).
I have an absolutely basic example:
from flox import Flox
# have your class inherit from Flox
class YourClass(Flox):
def query(self, query):
for _ in range(250):
self.add_item(
title=self.args,
subtitle=str(_)
)
if __name__ == "__main__":
YourClass()
And Flow Launcher is saying that the response does not contain any JSON tokens:
(don't mind "version 1.0.0", it's dev compiled by me for some tests, based on Flow-Launcher/Flow.Launcher@03983b9)
Flow Launcher version: 1.0.0
OS Version: 22621.2070
IntPtr Length: 8
x64: True
Python Path: C:\Users\ktos\AppData\Local\Programs\Python\Python310\pythonw.exe
Node Path:
Date: 08/09/2023 18:33:06
Exception:
YourClass Exception:
Websites: https://github.com/ktos/flowgpt
Author: ktos
Version: 0.1.0
Flow.Launcher.Core.ExternalPlugins.FlowPluginException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
---> System.Text.Json.JsonException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
---> System.Text.Json.JsonReaderException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0.
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
at System.Text.Json.Utf8JsonReader.Read()
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
--- End of inner exception stack trace ---
at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.JsonSerializer.ContinueDeserialize[TValue](ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack, JsonTypeInfo jsonTypeInfo)
at System.Text.Json.JsonSerializer.ReadFromStreamAsync[TValue](Stream utf8Json, JsonTypeInfo jsonTypeInfo, CancellationToken cancellationToken)
at Flow.Launcher.Core.Plugin.JsonRPCPlugin.DeserializedResultAsync(Stream output) in E:\proj2\Flow.Launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 95
at Flow.Launcher.Core.Plugin.JsonRPCPlugin.DeserializedResultAsync(Stream output) in E:\proj2\Flow.Launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 95
at Flow.Launcher.Core.Plugin.JsonRPCPlugin.QueryAsync(Query query, CancellationToken token) in E:\proj2\Flow.Launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 313
at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass22_0.<<QueryForPluginAsync>b__0>d.MoveNext() in E:\proj2\Flow.Launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 194
--- End of stack trace from previous location ---
at Flow.Launcher.Infrastructure.Stopwatch.DebugAsync(String message, Func`1 action) in E:\proj2\Flow.Launcher\Flow.Launcher.Infrastructure\Stopwatch.cs:line 40
at Flow.Launcher.Core.Plugin.PluginManager.QueryForPluginAsync(PluginPair pair, Query query, CancellationToken token) in E:\proj2\Flow.Launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 216
--- End of inner exception stack trace ---
at Flow.Launcher.Core.Plugin.PluginManager.QueryForPluginAsync(PluginPair pair, Query query, CancellationToken token) in E:\proj2\Flow.Launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 216
at Flow.Launcher.ViewModel.MainViewModel.<>c__DisplayClass139_0.<<QueryResults>g__QueryTask|2>d.MoveNext() in E:\proj2\Flow.Launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 849
--- End of stack trace from previous location ---
at Flow.Launcher.ViewModel.MainViewModel.QueryResults(Boolean isReQuery) in E:\proj2\Flow.Launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 850
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
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.