Open h4rdkor1 opened 7 months ago
Windows user? let me check
Yes I am using windows 11
Last release .msi updated. Close if issue solved
Still not working giving the same error. Does this program require something to be preinstalled in order to work.
The build process on windows is failing when adding app requirements. Right now I don't have the time to fix it, while I manage to fix it, try this steps to generate your own .msi file.
Hi @sinedie, I tried to do what you said but I don't have much knowledge about phyton so cant get anywhere. If you get time to fix this I will be really grateful Thank you.
Hi @sinedie. I don't know too. I am patiently waiting for you to hopefully solve it.
Hi @sinedie. I love your work. It would be awesome if you had the time to fix this. Best wishes to you, and keep up the good work! :)
Hello @merida77 @arlovibre @h4rdkor1
I tried to add "toga" to the windows requires can you give it a try, I cannot try it myself because I don't have a windows.
There is an error again, the same one.
Hello @merida77 @arlovibre @h4rdkor1
I tried to add "toga" to the windows requires can you give it a try, I cannot try it myself because I don't have a windows.
Hi @k-aito , Thank you for trying to fix the issue but I am still getting the same error as before.
Hi @k-aito , Thank you for trying to fix the issue but I am still getting the same error as before.
same:(
I don't have any idea...
Each I tried to add the requirement in the windows section, but normally by default they each get another GUI dependence, and it would normally bring back toga with him.
Without having windows to build or test, it's very hard.
The best would that someone with Windows and python knowledge try to follow https://github.com/sinedie/SRTranslator?tab=readme-ov-file#usage-from-gui like suggested @sinedie
Hello @merida77 @arlovibre @h4rdkor1
I dig a bit more and I noticed an issue https://github.com/beeware/briefcase/issues/977
It looks like the linked commit is in toga 4.2 so I rebuild the 2 msi with toga 0.4.1 and toga 0.4.2 (you can see it in the zip name).
It looks like 0.4.2 has an issue with linux so I hope that 0.4.1 would be enough but we will see.
Hi @k-aito, I tried both versions and both gave me the same toga error.
Hello @merida77 @arlovibre @h4rdkor1
I dig a bit more and I noticed an issue beeware/briefcase#977
It looks like the linked commit is in toga 4.2 so I rebuild the 2 msi with toga 0.4.1 and toga 0.4.2 (you can see it in the zip name).
It looks like 0.4.2 has an issue with linux so I hope that 0.4.1 would be enough but we will see.
Hello @k-aito. Thank you for trying again, I tried both versions and got the same "toga" error again.
Hello @merida77 @arlovibre @h4rdkor1
Sorry pinging everyone again, I tried one more time this time by using the workaround of the issue.
Using the version defined in the original file but adding toga-core
in each section.
Let's hope it's the right one
Thank you for trying again @k-aito, but again, the same error.
I have no more ideas for now sadly. It would be interesting to see if the normal briefcase process is working properly on Windows.
It would let us test it is related to briefcase directly or the packaging of briefcase but there is a need of a Windows computer for trying that sadly.
I think I have something @sinedie
It's not very clear but if you read the CI build for windows it fails in when it install the requirements because of UnicodeEncodeError: 'charmap' codec can't encode character '\u2502' in position 2: character maps to <undefined>
I can remove the message when I'm not installing togax-xml-layout-plugin
as requirement (in the pyproject file). You can maybe check if there si not a weird character somewhere that could make it fail ?
Finally got time for this... @k-aito , ty for finding that. The issue was on togax-xml-layout requirements. It had a linux-only dependency (pygobject).
So, now the msi is updated on last relase. (Also here: master-windows-2022.msi.zip)
Close if issue is solved.
Наконец-то появилось время для этого...@k-aito, спасибо, что нашел это. Проблема заключалась в требованиях к макету togax-xml. У него была зависимость только для Linux (pygobject).
Итак, теперь MSI обновлен до последней версии. (Также здесь: master-windows-2022.msi.zip )
Закройте, если проблема решена.
I have this error with your update
Traceback (most recent call last):
File "\app_packages\togax_xml_layout\xml_parser.py", line 146, in parse_element
instance = element_to_class(element.tag, attributes)
File "\app_packages\togax_xml_layout\xml_parser.py", line 106, in element_to_class
instance = klass(**init_args)
File "\app_packages\toga\widgets\activityindicator.py", line 25, in __init__
self._impl = self.factory.ActivityIndicator(interface=self)
File "\app_packages\toga_winforms\factory.py", line 76, in __getattr__
raise NotImplementedError(f"Toga's Winforms backend doesn't implement {name}")
NotImplementedError: Toga's Winforms backend doesn't implement ActivityIndicator
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "\app\srtranslatorGUI\__main__.py", line 4, in <module>
main().main_loop()
File "\app_packages\toga\app.py", line 749, in main_loop
self._impl.main_loop()
File "\app_packages\toga_winforms\app.py", line 284, in main_loop
raise self._exception
File "\app_packages\toga_winforms\app.py", line 257, in run_app
self.create()
File "\app_packages\toga_winforms\app.py", line 113, in create
self.interface._startup()
File "\app_packages\toga\app.py", line 710, in _startup
self.startup()
File "\app\srtranslatorGUI\app.py", line 50, in startup
self.main_window = parse_layout(self, f.read())
File "\app_packages\togax_xml_layout\xml_parser.py", line 158, in parse_layout
return parse_element(app, tree)
File "\app_packages\togax_xml_layout\xml_parser.py", line 131, in parse_element
children.append(parse_element(app, child))
File "\app_packages\togax_xml_layout\xml_parser.py", line 131, in parse_element
children.append(parse_element(app, child))
File "\app_packages\togax_xml_layout\xml_parser.py", line 131, in parse_element
children.append(parse_element(app, child))
[Previous line repeated 1 more time]
File "\app_packages\togax_xml_layout\xml_parser.py", line 151, in parse_element
instance = element_to_class(element.tag, attributes)
File "\app_packages\togax_xml_layout\xml_parser.py", line 106, in element_to_class
instance = klass(**init_args)
File "\app_packages\toga\widgets\activityindicator.py", line 25, in __init__
self._impl = self.factory.ActivityIndicator(interface=self)
File "\app_packages\toga_winforms\factory.py", line 76, in __getattr__
raise NotImplementedError(f"Toga's Winforms backend doesn't implement {name}")
NotImplementedError: Toga's Winforms backend doesn't implement ActivityIndicator
Finally got time for this... @k-aito , ty for finding that. The issue was on togax-xml-layout requirements. It had a linux-only dependency (pygobject).
So, now the msi is updated on last relase. (Also here: master-windows-2022.msi.zip)
Close if issue is solved.
Perfect, I had tried some random stuff when forking but I got nowhere close ^^
Наконец-то появилось время для этого...@k-aito, спасибо, что нашел это. Проблема заключалась в требованиях к макету togax-xml. У него была зависимость только для Linux (pygobject). Итак, теперь MSI обновлен до последней версии. (Также здесь: master-windows-2022.msi.zip ) Закройте, если проблема решена.
I have this error with your update
Traceback (most recent call last): File "\app_packages\togax_xml_layout\xml_parser.py", line 146, in parse_element instance = element_to_class(element.tag, attributes) File "\app_packages\togax_xml_layout\xml_parser.py", line 106, in element_to_class instance = klass(**init_args) File "\app_packages\toga\widgets\activityindicator.py", line 25, in __init__ self._impl = self.factory.ActivityIndicator(interface=self) File "\app_packages\toga_winforms\factory.py", line 76, in __getattr__ raise NotImplementedError(f"Toga's Winforms backend doesn't implement {name}") NotImplementedError: Toga's Winforms backend doesn't implement ActivityIndicator During handling of the above exception, another exception occurred: Traceback (most recent call last): File "\app\srtranslatorGUI\__main__.py", line 4, in <module> main().main_loop() File "\app_packages\toga\app.py", line 749, in main_loop self._impl.main_loop() File "\app_packages\toga_winforms\app.py", line 284, in main_loop raise self._exception File "\app_packages\toga_winforms\app.py", line 257, in run_app self.create() File "\app_packages\toga_winforms\app.py", line 113, in create self.interface._startup() File "\app_packages\toga\app.py", line 710, in _startup self.startup() File "\app\srtranslatorGUI\app.py", line 50, in startup self.main_window = parse_layout(self, f.read()) File "\app_packages\togax_xml_layout\xml_parser.py", line 158, in parse_layout return parse_element(app, tree) File "\app_packages\togax_xml_layout\xml_parser.py", line 131, in parse_element children.append(parse_element(app, child)) File "\app_packages\togax_xml_layout\xml_parser.py", line 131, in parse_element children.append(parse_element(app, child)) File "\app_packages\togax_xml_layout\xml_parser.py", line 131, in parse_element children.append(parse_element(app, child)) [Previous line repeated 1 more time] File "\app_packages\togax_xml_layout\xml_parser.py", line 151, in parse_element instance = element_to_class(element.tag, attributes) File "\app_packages\togax_xml_layout\xml_parser.py", line 106, in element_to_class instance = klass(**init_args) File "\app_packages\toga\widgets\activityindicator.py", line 25, in __init__ self._impl = self.factory.ActivityIndicator(interface=self) File "\app_packages\toga_winforms\factory.py", line 76, in __getattr__ raise NotImplementedError(f"Toga's Winforms backend doesn't implement {name}") NotImplementedError: Toga's Winforms backend doesn't implement ActivityIndicator
That looks like an error for @sinedie because Toga doesn't implement something for Windows. Good luck @sinedie ^^
@m1nuzz New release here got the updated msi. (with this ActivityIndicator issue fixed)
@sinedie @k-aito , Now the application opens but it freezes when try to translate subs.
@sinedie @k-aito , Now the application opens but it freezes when try to translate subs.
same
@sinedie @k-aito , Now the application opens but it freezes when try to translate subs.
Same
Hello @h4rdkor1 @m1nuzz @dante3732
I give a try with 1 SRT (using choose file) and pydeeplx, and it works for me on Linux. Can one of you give it a try with something else than DeepL scraper?
Hello @h4rdkor1 @m1nuzz @dante3732
I give a try with 1 SRT (using choose file) and pydeeplx, and it works for me on Linux. Can one of you give it a try with something else than DeepL scraper?
It happened on any translator with WIN 11.
Hello @dante3732
There is no debug information in the terminal? Maybe launching the exe from the terminal would display something as logs.
@dante3732 it's possible that you give a try with a very small SRT, like 1 sentence. Just to be sure that it is really blocking and not just missing to display the progression.
it's possible that you give a try with a very small SRT, like 1 sentence. Just to be sure that it is really blocking and not just missing to display the progression.
Immediately after clicking translate, the program stops responding. I tried SRT with a single line.
Hello @dante3732
There is no debug information in the terminal? Maybe launching the exe from the terminal would display something as logs.
I do not know how to do this through the terminal.
Hello @dante3732
Can you give a try to this one, I added asyncio as dependance.
Can you give a try to this one, I added asyncio as dependance.
Same stops responding.
@dante3732 for launching the file from the terminal you can open a command prompt and then drag and drop the executable, maybe there will be some information.
You can start a command prompt by doing execute
and typing cmd
if I recall correctly.
for launching the file from the terminal you can open a command prompt and then drag and drop the executable, maybe there will be some information.
When running this way, no debugging appears on the command line.
k-aito-patch-1-windows-2022.msi.zip
@dante3732 no big change, I just removed the display of the progression, can you try again the 1 line SRT to see if it can finish?
The idea is to try to find what part of the application is freezing windows.
k-aito-patch-1-windows-2022.msi.zip
@dante3732 no big change, I just removed the display of the progression, can you try again the 1 line SRT to see if it can finish?
The idea is to try to find what part of the application is freezing windows.
Tried what you said, still the app is "not responding".
no big change, I just removed the display of the progression, can you try again the 1 line SRT to see if it can finish?
Same stop respond.
k-aito-patch-1-windows-2022.msi.zip
@dante3732 no big change, I just removed the display of the progression, can you try again the 1 line SRT to see if it can finish?
The idea is to try to find what part of the application is freezing windows.
It freezes again unfortunately. Have you had any chance to look into it again?
Hello @arlovibre
On my side without a Windows it's very difficult. For me, the command line version is working, and I don't see any reason it would hang with the GUI code that works on Linux.
Until someone that can try to build and run the briefcase version and maybe have some debug info, I think it will be difficult to fix.
Hello @arlovibre @dante3732 @m1nuzz
I read the code again and the only thing that for me must be an issue is the async function. So I added prints and I hope that when it freezes it will show the last that worked to be certain that the error is from there.
Hello @arlovibre @dante3732 @m1nuzz
I read the code again and the only thing that for me must be an issue is the async function. So I added prints and I hope that when it freezes it will show the last that worked to be certain that the error is from there.
It freezes as before.
Hello @dante3732 there are no numbers at all that are displayed at the right of the screen?
Hello @dante3732 there are no numbers at all that are displayed at the right of the screen?
It means that the function is not even launched... Maybe it's related to the toga xml layout. I will try to see if I find something about it.
@sinedie if you have an idea what could prevent windows to launch the function don't hesitate
Not having windows to debug is the main problem for me.
I don't think it is related with toma-xml-layout as if it didn't work app wouldn't open in first place.
Most probably it is an AsyncIO issue, maybe it is blocking the main Toga thread. Idk.
Gonna check if can get a virtual windows machine or anything and try to fix it. Dont have too many spare time lately, but will fix this for sure.
@k-aito I can confirm the issue is with AsynIO blocking the main event loop of Toga. The issue happened to me when, inside translate function, I use any other subrutine, even with only a print statement. Still researching but right now Im lost on how to solve it.
Im seriusly thinking in switch to another GUI framework. Even with another tech stack like Tauri or NeutralinoJs
Hello @sinedie
Only on Windows or on Linux also? I didn't let it completely translate something on Linux, but I didn't notice it was blocking.
I don't know Tauri or Nautralinojs at all but could still be fun to look at it.
@k-aito in windows, linux works fine
Hi @sinedie Thank you for creating the GUI version for all of us. I am getting error when trying to run the new GUI version of the translator but its not working. I am getting the below error.
Traceback (most recent call last): File "\app\srtranslatorGUI\__main__.py", line 1, in <module> from srtranslatorGUI.app import main File "\app\srtranslatorGUI\app.py", line 3, in <module> import toga ModuleNotFoundError: No module named 'toga'