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

Update the plugin to use flow-lib==0.20.1? #28

Open
Xelbayria opened this issue Jan 6, 2024 · 9 comments
Open

Update the plugin to use flow-lib==0.20.1? #28

Xelbayria opened this issue Jan 6, 2024 · 9 comments

Comments

@Xelbayria
Copy link

As the title say:

why should it be updated to v0.20.1?
Another plugin also uses flow-lib package: Github Notification. which requests v0.20.1 and you could say it's a conflict package. I either have to use 0.14.1 for currency or 0.20.1 for Github notification

@deefrawley
Copy link
Owner

Are you getting an error using this plugin? You shouldn't as each python plugin keeps its dependencies separate to others..

@Xelbayria
Copy link
Author

yea. If i'm using 0.20.1 for Github notification.

each python plugin keeps its dependencies separate to others

hmmm. I am using Python 3.12 and I know these plugins require specific versions of packages from Python.

Do u have a solution?

@deefrawley
Copy link
Owner

If you are getting an error please post it here so I can see what is happening.

@Xelbayria
Copy link
Author

Here it is :

Error Log Flow Launcher version: 1.16.2 OS Version: 19045.3803 IntPtr Length: 8 x64: True

Python Path: ~\apps\python\3.12.1\pythonw.exe
Node Path:
Date: 01/06/2024 19:51:27
Exception:
Currency Converter Exception:
Websites: https://github.com/deefrawley/Flow.Launcher.Plugin.Currency
Author: deefrawley
Version: 2.0.6
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, ReadOnlySpan1 bytes) at System.Text.Json.Utf8JsonReader.Read() at System.Text.Json.Serialization.JsonConverter1.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.JsonConverter1.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 C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 90 at Flow.Launcher.Core.Plugin.JsonRPCPlugin.DeserializedResultAsync(Stream output) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 93 at Flow.Launcher.Core.Plugin.JsonRPCPlugin.QueryAsync(Query query, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 312 at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass22_0.<<QueryForPluginAsync>b__0>d.MoveNext() in C:\projects\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, Func1 action) in C:\projects\flow-launcher\Flow.Launcher.Infrastructure\Stopwatch.cs:line 40
at Flow.Launcher.Core.Plugin.PluginManager.QueryForPluginAsync(PluginPair pair, Query query, CancellationToken token) in C:\projects\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 C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 216
at Flow.Launcher.ViewModel.MainViewModel.<>c__DisplayClass139_0.<g__QueryTask|2>d.MoveNext() in C:\projects\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 C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 850
at System.Threading.Tasks.Task.<>c.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)

@deefrawley
Copy link
Owner

That seems to be an issue with the Fllow plugin manager in some capacity.
Also as a heads up, it's usually less hassle to let Flow install its own python and use that rather than use your own install.

@Xelbayria
Copy link
Author

Xelbayria commented Jan 8, 2024

it's usually less hassle to let Flow install its own python and use that rather than use your own install.

I don't know it was capable of that. I'll see if I can fix that on my side.

EDIT:
right, I forgot to mention that Flow Launcher is in Portable mode.

@Xelbayria
Copy link
Author

Xelbayria commented Jan 8, 2024

Error Log Flow Launcher version: 1.16.2 OS Version: 19045.3803 IntPtr Length: 8 x64: True

Python Path: \flow-launcher\current\app-1.16.2\UserData\Environments\Python\PythonEmbeddable-v3.11.4\pythonw.exe
Node Path:
Date: 01/07/2024 20:33:46
Exception:
Github Notifications Exception:
Websites: https://github.com/Garulf/github-notifications
Author: Garulf
Version: 4.0.2
Flow.Launcher.Core.ExternalPlugins.FlowPluginException: ModuleNotFoundError: No module named '_cffi_backend'
thread '' panicked at 'Python API call failed', C:\Users\runneradmin.cargo\registry\src\index.crates.io-6f17d22bba15001f\pyo3-0.18.3\src\err\mod.rs:790:5
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
Traceback (most recent call last):
File "
\flow-launcher\current\app-1.16.2\UserData\Plugins\Github Notifications-4.0.2\run.py", line 9, in
from plugin.main import GithubNotifications
File "\flow-launcher\current\app-1.16.2\UserData\Plugins\Github Notifications-4.0.2\plugin\main.py", line 4, in
from github import Github
File "
\flow-launcher\current\app-1.16.2\UserData\Plugins\Github Notifications-4.0.2\lib\github_init_.py", line 40, in
from . import Auth
File "\flow-launcher\current\app-1.16.2\UserData\Plugins\Github Notifications-4.0.2\lib\github\Auth.py", line 30, in
import jwt
File "
\flow-launcher\current\app-1.16.2\UserData\Plugins\Github Notifications-4.0.2\lib\jwt_init_.py", line 1, in
from .api_jwk import PyJWK, PyJWKSet
File "\flow-launcher\current\app-1.16.2\UserData\Plugins\Github Notifications-4.0.2\lib\jwt\api_jwk.py", line 7, in
from .algorithms import get_default_algorithms, has_crypto, requires_cryptography
File "
\flow-launcher\current\app-1.16.2\UserData\Plugins\Github Notifications-4.0.2\lib\jwt\algorithms.py", line 12, in
from .utils import (
File "\flow-launcher\current\app-1.16.2\UserData\Plugins\Github Notifications-4.0.2\lib\jwt\utils.py", line 7, in
from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurve
File "
\flow-launcher\current\app-1.16.2\UserData\Plugins\Github Notifications-4.0.2\lib\cryptography\hazmat\primitives\asymmetric\ec.py", line 11, in
from cryptography.hazmat._oid import ObjectIdentifier
File "~\flow-launcher\current\app-1.16.2\UserData\Plugins\Github Notifications-4.0.2\lib\cryptography\hazmat_oid.py", line 9, in
from cryptography.hazmat.bindings._rust import (
pyo3_runtime.PanicException: Python API call failed

---> System.IO.InvalidDataException: ModuleNotFoundError: No module named 'cffi_backend'
thread '' panicked at 'Python API call failed', C:\Users\runneradmin.cargo\registry\src\index.crates.io-6f17d22bba15001f\pyo3-0.18.3\src\err\mod.rs:790:5
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
Traceback (most recent call last):
File "\flow-launcher\current\app-1.16.2\UserData\Plugins\Github Notifications-4.0.2\run.py", line 9, in
from plugin.main import GithubNotifications
File "
\flow-launcher\current\app-1.16.2\UserData\Plugins\Github Notifications-4.0.2\plugin\main.py", line 4, in
from github import Github
File "~\flow-launcher\current\app-1.16.2\UserData\Plugins\Github Notifications-4.0.2\lib\github_init
.py", line 40, in
from . import Auth
File "\flow-launcher\current\app-1.16.2\UserData\Plugins\Github Notifications-4.0.2\lib\github\Auth.py", line 30, in
import jwt
File "
\flow-launcher\current\app-1.16.2\UserData\Plugins\Github Notifications-4.0.2\lib\jwt_init_.py", line 1, in
from .api_jwk import PyJWK, PyJWKSet
File "\flow-launcher\current\app-1.16.2\UserData\Plugins\Github Notifications-4.0.2\lib\jwt\api_jwk.py", line 7, in
from .algorithms import get_default_algorithms, has_crypto, requires_cryptography
File "
\flow-launcher\current\app-1.16.2\UserData\Plugins\Github Notifications-4.0.2\lib\jwt\algorithms.py", line 12, in
from .utils import (
File "\flow-launcher\current\app-1.16.2\UserData\Plugins\Github Notifications-4.0.2\lib\jwt\utils.py", line 7, in
from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurve
File "
\flow-launcher\current\app-1.16.2\UserData\Plugins\Github Notifications-4.0.2\lib\cryptography\hazmat\primitives\asymmetric\ec.py", line 11, in
from cryptography.hazmat._oid import ObjectIdentifier
File "~\flow-launcher\current\app-1.16.2\UserData\Plugins\Github Notifications-4.0.2\lib\cryptography\hazmat_oid.py", line 9, in
from cryptography.hazmat.bindings._rust import (
pyo3_runtime.PanicException: Python API call failed

at Flow.Launcher.Core.Plugin.JsonRPCPlugin.ExecuteAsync(ProcessStartInfo startInfo, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 297
at Flow.Launcher.Core.Plugin.JsonRPCPlugin.ExecuteAsync(ProcessStartInfo startInfo, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 297
at Flow.Launcher.Core.Plugin.JsonRPCPlugin.QueryAsync(Query query, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 313
at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass22_0.<b__0>d.MoveNext() in C:\projects\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 C:\projects\flow-launcher\Flow.Launcher.Infrastructure\Stopwatch.cs:line 40
at Flow.Launcher.Core.Plugin.PluginManager.QueryForPluginAsync(PluginPair pair, Query query, CancellationToken token) in C:\projects\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 C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 216
at Flow.Launcher.ViewModel.MainViewModel.<>c__DisplayClass139_0.<g__QueryTask|2>d.MoveNext() in C:\projects\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 C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 850
at System.Threading.Tasks.Task.<>c.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)

I've change it to use its own Python and CurrencyPP Currency Conversion is working properly but Github Notification is not. I thought it would have downloaded the package of Python on its own. Is there a way to fix this?

EDIT:
wrong plugin name

@deefrawley
Copy link
Owner

Just to confirm - Flow has two currency conversion plugins (that I'm aware of). CurrencyPP isn't mine. Did you test with my plugin as that may not work either.

@Xelbayria
Copy link
Author

My mistake. I meant Currency Conversion yes. I tested your plugin. it worked fine.

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

No branches or pull requests

2 participants