-
Notifications
You must be signed in to change notification settings - Fork 5
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
RHEL 7 COMPILED VERSION ERROR: On Ubuntu 22.04 LTS and 24.04: "Invalid or missing encoding declaration" error message #62
Comments
Running under Plasma Wayland, here's the kinfo output:
|
Hello, The tar archive should be decompressed in /usr/local/bin so you actually endup with /usr/local/bin/npbackup-gui/ directory containing the executable. But you can drop it where you want, there's no hardcoded directories. The errors you're getting suggest permission issues. Your user isn't even allowed to write in /var/log Can you try running as root to outrule permission issues ? |
Ok, it wasn't clear to me from the instructions that I was supposed to copy the directory (I initially thought that I can copy just the Extracting it into
I get this again: And the terminal output:
When running with |
BTW - the file |
Okay, running it in your home folder with TBH, I've no clue what could be the python problem here, I've ran 3.0.0RC1 on Debian/RHEL/Fedora systems so far. Did you run the GUI via a shortcut or via a shell ? If the latter is true, would you mind running it via another console app, or directly and a shortcut ? The above will perhaps give me an insight. I probably have to setup a KDE + wayland env to check if it appears that you're dealing with a GUI problem. |
BTW, updated install instructions as per your remarks. A last test I could ask you is to install via python to a temp location you can delete later and test:
This will allow me to outrule any compilation issues. |
I'm using the locale
Indeed it is the same output.
The CLI does not run into the same problem. It seems to require an existing configuration (which I have yet to set up and I'm not yet sure what it means) but no obvious errors, except the requirement to manually set the log file otherwise it tries to write to the not user accessible
I really feel that the default log file should in
KDE Neon is a build of latest (stable or testing) Plasma on the latest Ubuntu LTS and is provided by the KDE project as "best way to follow Plasma development". It is similar to GNOME's OS in scope, but unlike GNOME's that is meant only for testing (and I'm not sure how many GNOME devs are actually running it), Neon is intended for a wider audience and (at least on the stable branch) is considered daily-driver quality.
That seems to work fine.
The GUI application runs under XWayland, so it probably doesn't need to know about Wayland, unless you'd want to use portals - which isn't currently the case. |
Also:
All the test above were done from the KDE terminal application Konsole. Using GNOME terminal or executing the command directly from a GUI has the exact same issue. |
Thanks for your report. The It's really interesting that using the non compiled (ie I've checked in the nuitka issues and found a similar issue, which has been closed for non feedback. Thanks for your help. |
It will take some time for me to get a reproducilble minimum example to submit to Nuitka's dev team. |
[comment updated] hello @Deejan,
Let me know if you need more information or trials. |
Got really bad internet right now, it took ages to get an Ubuntu spinned up. But I was able to reproduce the issue. Building directly in Ubuntu 22.04 LTS works: I usually build on RHEL7 since the compiler (Nuitka) states that what is built on old systems works on recent ones, but not the contrary. In the meantime, I've published an ubuntu compiled version at https://github.com/netinvent/npbackup/releases/download/v3.0.0-rc1/npbackup-linux-x64-gui-public-ubuntu.tar.gz |
That is legit, but there are two issues with that behavior:
Various reports on the internet suggest that the problem is that a binary file is being opened as a text file, and since modern systems (like recent Ubuntu LTSs) default to UTF-8 as the system text codec, and unlike most 8-bit encoding UTF-8 has non-coding byte values (specifically, 0x80) python can fail to open some binary files in text mode. RHEL7's system text encoding is ANSI_X3.4-1968, which AFAIK maps all byte values to something, so it will open binary files in text mode without a problem. I suggest forcing your RHEL7 build environment to UTF-8 mode by setting the |
In case it helps: File provided earlier (ubuntu compiled version) Worth to mention in Fedora 40 the warning message regarding the permissions in /var/log remains. Of course you can set the --log-file flag but as commented by @guss77 probably it would be a good idea to use a fallback directory. |
Thank you for the input. But as said, I have very limited internet for the next weeks, so don't expect any (good) news until July ;) |
So I've compiled with both ̀LC_ALL=C I've checked all my open statements (corrected some missing encodings), but the exact error comes from i'll take any advice ;) |
Here's what I've tried so far:
I will at least create a PR for the patched PySimpleGUI here and probably here |
I think the bug report in Nuitka is more or less relevant - as far as I can tell the problem is a weird interaction between Nuitka - that compiles Python code to a binary executable, and various things that want to read the source code that executes them for various reasons, and assume that is must be a textual source code (encoded in UTF-8, though there are some facilities to override that). This assumption of course breaks for Nuitka built code. This would also explain why the pip install works - it doesn't use a binary compiled executable. Specifically the problem in I think the best bet is to drop the debugging function somehow from PySimpleGUI - though I don't see a configuration option to control that, which I'm guess is what your patch is about: you didn't specify and I didn't find a PR about it. I tried some of the latest builds only only the "psgfix" build works for me. |
Fixes PR have been done upstream. |
After copying the content of the
npbackup-gui
archive from 3.0.0 RC to/usr/local/bin
(not my preferred way of installing huge multi-file applications, but for the sake of following instructions to the letter), I run the command and immediately get an error window:If I close it I get this text in the terminal:
The text was updated successfully, but these errors were encountered: