Tomkov1c / Lorem-Ipsum-Generator

Generate Lorem Ipsum paragraphs / words / sentences from Flow Launcher.
1 stars 0 forks source link

Error messages when generating (some) types of text #2

Open enoversum opened 2 months ago

enoversum commented 2 months ago

Hi again,

seems I am one of the few people using your plugin, and this time, I'm having a bit of trouble. When trying to generate e.g. 5 paragraphs, your extension either only generates one paragraph, or fails with an error:

Please open new issue in: https://github.com/Flow-Launcher/Flow.Launcher/issues

  1. upload log file: D:\programme\flowlauncher\app-1.19.0\UserData\Logs\1.19.0\2024-09-03.txt
  2. copy below exception message

Flow Launcher version: 1.19.0 OS Version: 22635.4145 IntPtr Length: 8 x64: True

Python Path: D:\programme\flowlauncher\app-1.19.0\UserData\Environments\Python\PythonEmbeddable-v3.11.4\pythonw.exe Node Path: D:\programme\flowlauncher\app-1.19.0\UserData\Environments\Node.js\Node-v16.18.0\node-v16.18.0-win-x64\node.exe Date: 09/03/2024 16:13:42 Exception: System.Runtime.InteropServices.COMException (0x800401D0): OpenClipboard fehlgeschlagen (0x800401D0 (CLIPBRD_E_CANTOPEN)) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode, IntPtr errorInfo) at System.Windows.Clipboard.Flush() at Flow.Launcher.Plugin.LoremIpsumGenerator.MyFlowPlugin.clipboardParagraph(ActionContext context) in C:\Users\gamin\AppData\Local\FlowLauncher\app-1.18.0\Plugins\Lorem-Ipsum-Generator\Lorem Ipsum C#\Main.cs:line 312 at Flow.Launcher.Plugin.Result.ExecuteAsync(ActionContext context) in //Flow.Launcher.Plugin/Result.cs:line 246 at Flow.Launcher.ViewModel.MainViewModel.OpenResultAsync(String index) in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 389 at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask) 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)

It would seem the error though might be connected to a general problem of 1.19.0 with Python and/or plugins. I'm having similar errors with a clipboard plugin for FlowLauncher.

Tomkov1c commented 2 months ago

Are you sure you're using the c# version?

enoversum commented 2 months ago

@Tomkov1c Yes, I am sure. Using the version off the store. The clipboard error could be something more general though, I'm having a bit of trouble with a clipboard plugin for FL as well. The issue with only one paragraph being generated still remains.

enoversum commented 2 months ago

Also, while I'm here, I'm always told there is an update, although I uninstalled and re-installed your plugin's current version. FL says I have 2.0.0, but plugin manager claims there is 2.1.0, tries to update but fails. The plugin's folder states it is 2.1.0 that I have, FL seems to be incorrect.

Tomkov1c commented 2 months ago

I was planning on optimizing and improving the algorithm soon. It will take some time but it will hopefully solve your issue.

enoversum commented 2 months ago

@Tomkov1c All well, Tom, just happy you created this plugin, so dummy text is just a few keystrokes away. Also wondering why creating multiple paragraphs isn't working anymore, as it did work some time ago, with your plugin. Maybe in the last version, I don't remember ;) .

Tomkov1c commented 2 months ago

I guess I wrote some garbage code

enoversum commented 2 months ago

I guess I wrote some garbage code

Don't be too hard on yourself 😆 .

Tomkov1c commented 2 months ago

It would seem the error though might be connected to a general problem of 1.19.0 with Python and/or plugins. I'm having similar errors with a clipboard plugin for FlowLauncher.

I'm a bit confused why it's giving out python errors. There is 0 python in the v2 and v2.1.

I have 2.0.0, but plugin manager claims there is 2.1.0, tries to update but fails. The plugin's folder states it is 2.1.0 that I have, FL seems to be incorrect.

I forgot to change plugin.json version to 2.1. that's why it says 2.0 in FL. Try replacing it manually

I'm trying to reproduce the error. Works normally. No errors. No single ____ generated. When you encounter them, can you screenshot them and write the FL query you wrote (ex. *activation keyword* paragraph 5)_ in here. It would help a lot.

enoversum commented 2 months ago

@Tomkov1c It usually happens when I just trigger a paragraph creation, so lorem p. But not all the time, funny enough. The error might have something to do with the clipboard handling. I certainly haven't changed anything, but have Clipboard+ installed as a second plugin that takes care of the clipboard. Maybe they intermingle for a bit?

Tomkov1c commented 2 months ago

Perhaps, but Clipboard+ isn't written in python either.

enoversum commented 2 months ago

No idea then, maybe something to do with FL after all. So, since you're referring to Python, you're not only reading the first line of the log report (which states my Python version), but also the error messages are from Python?

Tomkov1c commented 2 months ago

Sorry for a late replay.

I don't know if FL throws a python error every time a plugin malfunctions (doesn't seem logical to me) but a plugin I use (SpotifyPremium) is made in C# and has been throwing python errors for the past 3 months.

Might be FL, might be not

enoversum commented 2 months ago

No idea either. I just know I am being bugged with error messages when I create a piece of text and it's copied to the clipboard. It's not extreme, so I'll just wait and see if it somehow gets solved :D .

enoversum commented 2 months ago

Just FYI, it's still happening to me on the latest FL version just released today (1.19.2), and I can't see any culprit or anyone else having this error with FL via GitHub. There were two issues with the clipboard dating back to 2022 being solved, but no recent mentions. I use Clipboard+ as a clipboard manager plugin within FL, and I'm not getting any error messages with that, just on 90% of clipboard copying with your plugin, I'm afraid. If there is anything I can help to find out what is causing this, just let me know.

Tomkov1c commented 2 months ago

¯_(ツ)_/¯ A new version is in the works. I'll rewrite the copying algorithm and hope it fixes your issue.

enoversum commented 2 months ago

¯(ツ)/¯ A new version is in the works. I'll rewrite the copying algorithm and hope it fixes your issue.

Aw, that sounds wonderful! Thanks for the heads up, I'll be waiting for the new version and will report back if it indeed helps!

Tomkov1c commented 3 weeks ago

A new version is out, although I was unable to find a way to change how the plugin copies Lorem to the clipboard. Im going to take a look at the plugin's source code and try to contect the devs.

enoversum commented 3 weeks ago

A new version is out, although I was unable to find a way to change how the plugin copies Lorem to the clipboard. Im going to take a look at the plugin's source code and try to contect the devs.

Hey Tom, I'll wait for the update to come through and will let you know if the clipboard issues prevailed or eventually disappeared :) . Did you manage to solve the issue with only one paragraph being created even if choosing more than one?

Tomkov1c commented 3 weeks ago

I didn't realize at the time that the number you specify when trying to generate a paragraph is the number of sentences in it. I can add an option in the setting for the amount of paragraphs and not the amount of sentences in a paragraph.

enoversum commented 3 weeks ago

I didn't realize at the time that the number you specify when trying to generate a paragraph is the number of sentences in it. I can add an option in the setting for the amount of paragraphs and no the amount of sentences in a paragraph.

Yes, that's what I wanted to do. I mistook the amount for paragraphs, not sentences 😉. And just realised what the settings mean. For me, it would make more sense to specify the amount of sentences or paragraphs to quickly fill something with x amounts of sentences or paragraphs :) .

Tomkov1c commented 3 weeks ago

Ok I will add it. You'll have to wait for version 3.1.0 tho

enoversum commented 3 weeks ago

Ok I will add it. You'll have to wait for version 3.1.0 tho

Aw, thanks, you're too good :) .

enoversum commented 2 weeks ago

@Tomkov1c I think, I think the error messages are now gone for good. Didn't create too much bogus text these days, but I tried hammering your plugin with a whole bunch just now, and a few throughout recent days, and never got this error message again. Fingers crossed :) .

Tomkov1c commented 2 weeks ago

Thats good to hear 👍