argosopentech / argos-translate-gui Goto Github PK
View Code? Open in Web Editor NEWGraphical user interface for Argos Translate
License: MIT License
Graphical user interface for Argos Translate
License: MIT License
Hi, PyQT5 version5.15.4 has no wheel for Python 3.10 which is the default install in Windows 10. When trying to install argos-translate-gui the installation will then fail with this error, as pip will try to compile QT from source:
C:\Users\Somebody>pip install argostranslategui
Collecting argostranslategui
Using cached argostranslategui-1.6.3-py3-none-any.whl (6.7 kB)
Requirement already satisfied: argostranslate in c:\users\Somebody\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from argostranslategui) (1.8.0)
Collecting PyQt5==5.15.4
Using cached PyQt5-5.15.4.tar.gz (3.3 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
Traceback (most recent call last):
File "C:\Users\Somebody\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\Users\Somebody\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\Somebody\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 152, in prepare_metadata_for_build_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "C:\Users\Somebody\AppData\Local\Temp\pip-build-env-e2m4s112\overlay\Lib\site-packages\sipbuild\api.py", line 46, in build_wheel
project = AbstractProject.bootstrap('wheel',
File "C:\Users\Somebody\AppData\Local\Temp\pip-build-env-e2m4s112\overlay\Lib\site-packages\sipbuild\abstract_project.py", line 87, in bootstrap
project.setup(pyproject, tool, tool_description)
File "C:\Users\Somebody\AppData\Local\Temp\pip-build-env-e2m4s112\overlay\Lib\site-packages\sipbuild\project.py", line 585, in setup
self.apply_user_defaults(tool)
File "C:\Users\Somebody\AppData\Local\Temp\pip-install-obyn7fgf\pyqt5_137ee3c0c5534bb3aae4385f45cba038\project.py", line 63, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\Somebody\AppData\Local\Temp\pip-build-env-e2m4s112\overlay\Lib\site-packages\pyqtbuild\project.py", line 70, in apply_user_defaults
super().apply_user_defaults(tool)
File "C:\Users\Somebody\AppData\Local\Temp\pip-build-env-e2m4s112\overlay\Lib\site-packages\sipbuild\project.py", line 236, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "C:\Users\Somebody\AppData\Local\Temp\pip-build-env-e2m4s112\overlay\Lib\site-packages\pyqtbuild\builder.py", line 69, in apply_user_defaults
raise PyProjectOptionException('qmake',
sipbuild.pyproject.PyProjectOptionException
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Can you update the dependencies to use 5.15.5, which has a Python 3.10 wheel?
Hello,
need help to get argos-translate-gui to work again after QT5 update:
Error message:
Cannot mix incompatible Qt library (5.15.2) with this library (5.15.3)
Aborted (core dumped)
I already tried to fix the issue and made the update of:
qt5-styleplugins 5.0.0.20170311-28
But it did not help.
Thanks for help,
Kind regards,
Michael
downloading a language package leads to a loop of
(<HTTPError 403: 'Forbidden'>,) (<HTTPError 403: 'Forbidden'>,) (<HTTPError 403: 'Forbidden'>,) (<HTTPError 403: 'Forbidden'>,)
then ending with
raise Exception(f"Download failed for {url}")
This can make it difficult or impossible to read pasted text under some circumstances.
To reproduce, open a rich text editor and create some formatted text, or find some online and copy-paste it into the GUI.
Usually the text that will be entered as a query on the left is in the clipboard. But then there is text already in the field saying “text to translate from”. When pasting the clipboard in that box, the msg does not clear, so the “text to translate from” becomes part of the translation. If the text is removed at that point, then it takes a very long time to reprocess the whole translation again. And the new request does not interrupt the backend process that’s still working on the 1st snip of text, so both versions must be fully translated before the user can see the result.
Suppose the user clears the hint text first, and in the fastest way possible (by selecting all the text and hitting delete). The act of selecting the text clobbers the clipboard in many linux desktop managers, so they must recopy the text. But if the text is removed by hitting delete one character at a time, then the backend works to submit a new translation each time a character is removed.
After using this installation procedure (as root):
pip3 install --log-file ~/log/pip3-argostranslategui.err --log ~/log/pip3-argostranslategui.log --cache-dir /usr/local/pkgs argostranslategui
No man page was created. And when running argos-translate-gui -h
, the GUI app is launched without giving help output. There should be a help page no matter how trivial it is so that users at least see that there are no options. Some things that should be covered by the help page:
Since the GUI does take the liberty of connecting to the Internet (to download lang pairs), users would expect to see a --proxy
option or absence thereof.
A “bugs” section to tell users where to report bugs. (Which btw would ideally not force users to interact with MS Github.)
Information about where lang pair libs are stored, most particularly because this differs from the CLI version.
These installation instructions should tell users how to install it systemwide (as root) and how to install it individually for one user:
https://github.com/argosopentech/argos-translate-gui#install
ATM it makes no mention of root, but it should say to run as root if that’s the only way. I know from experimentation that those instructions work for root but I’ve not tested as a user.
Those installation instructions should also disclose 2 sizes: the download size for bandwidth calculations (for those on measured rate connections) and the installation size after everything is unpacked. Normal mainstream package managers (like aptitude) generally give users that info by design, but since pip3 is quite underdeveloped it does not give that info so it should be documented.
pip3
quietly dumps downloaded installation files in /tmp/
without telling users where the files are. This is dicey particularly if the download is interrupted. So I would propose suggesting use of the --cache-dir
option to users. It might sound like too much hand-holding, but pip3
is a developer tool -- it was never intended for normal users. And pip3
is very poorly documented. That is, the man page and help page are inconsistent with each other and with what the software does.
Greetings,
I've been looking for a way to change the background to dark/black, butI couldn't find a configuration file.
I would really like to make the changes myself, but altough I can read Python, I know nothing of QT.
I'm reasonably sure it's a QT thing because the GUI initiates with dark background on my Plasma desktop, without any extra configuration. However this does not happen on other DE, and on the Xubuntu laptop, which I use more often.
I wonder if you could create configuration file, or some other option to get a dark background on the argos-gui myeyeswould be very grateful (and so would I :)
Kudos.
Mirroring this bug here:
argosopentech/argos-translate#253
It’s actually the GUI side that should address this problem because it’s the GUI that fails to document the storage location.
This command should tell me where the GUI-fetched lang pair data ended up:
find ~ -iname \*argosmodel
But no, it only shows one file:
~/.local/cache/argos-translate/downloads/translate-fr_en.argosmodel
That file was fetched using argospm
. There should be another file for a different language pair that was fetched using the GUI. Where did that data go?
(edit)
It seems the GUI downloader is storing the data in an unpacked format, so it creates: ~/share/argos-translate/packages/
«lang pair»/model/model.bin
In fact, it seems all lang pairs are stored in ~/share/argos-translate/packages/
, the GUI and CLI just have a difference in cleanup procedures, assuming the *argosmodel
file is temporary and discardable.
When using the GUI to fetch a new language pair, the process crashed out of the pure blue without reason. The GUI window disappeared, and the terminal showed a dump of how many bytes were fetched and how many were not. It did not say why it crashed, but after eating up ~80mb of a measured rate service I was stuffed. I switched to the CLI method (argospm
) in hopes of getting more verbosity. I got zero verbosity and not only that but it started over from the beginning. It should have already had ~99% of the file.
Apparently the GUI downloader uses different code than argospm
(as they are storing the data in different locations). So the GUI and argospm
both need a crash recovery mechanism. This bug report is for the GUI downloader.
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.