Closed ieanuc01 closed 2 years ago
Just noticed in the 5th line down, run_name='main', should have two underscores before and after main (apparently that's a formatting feature for bold).
Thank you for reporting this issue, but signing with proper key. That's a new one to me. Is Fedora now requiring signing of Python modules?
Apparently abrtd will not process a core dump if the module involved is not GPG signed (I know, sounds crazy???). I changed the abrtd config file to specify 'OpenGPGCheck = no', and those messages are now gone and abrt successfully took the dump.
Dec 09 23:49:52 bpcc9395.localdomain systemd[1587]: Started Application launched by gnome-shell.
Dec 09 23:49:53 bpcc9395.localdomain python3[2691]: detected unhandled Python exception in '/usr/local/bin/sunflower'
Dec 09 23:49:53 bpcc9395.localdomain sunflower.desktop[2691]: Traceback (most recent call last):
Dec 09 23:49:53 bpcc9395.localdomain sunflower.desktop[2691]: File "/usr/local/bin/sunflower", line 4, in
[root@bpcc9395 ~]# cd /var/spool/abrt [root@bpcc9395 abrt]# ls -la total 4 drwxr-x--x. 1 root abrt 94 Dec 9 23:49 . drwxr-xr-x. 1 root root 104 Dec 9 00:38 .. -rw-------. 1 root root 24 Dec 9 23:49 last-via-server drwxr-x---. 1 dxn55 abrt 704 Dec 9 23:49 Python3-2020-12-09-23:49:53-2691 [root@bpcc9395 ~]# cd Python3-2020-12-09-23:49:53-2691 [root@bpcc9395 ~]# less backtrace
runpy.py:141:_get_module_details:ImportError: No module named sunflower
Traceback (most recent call last):
File "/usr/local/bin/sunflower", line 4, in
Local variables in innermost frame: mod_name: 'sunflower' error: <class 'ImportError'> pkgname: '' : 'sunflower' spec: None backtrace (END)
FWIW sunflower-0.3.61-1 runs OK on Fedora 33, but I had to install python2-chardet and vte on Fedora 33 from Fedora 31 rpm's (python2-chardet-3.0.4-10.fc31.noarch.rpm, vte-0.28.2-29.fc31.x86_64.rpm). python2-chardet was "not found" in the Fedora 33 repositories. Sunflower complained "vte not installed on this system" with the Fedora 33 vte.
Sorry I completely got sidetracked this weekend. So 0.3 version is based on GTK2, so its dependencies are much easier to satisfy and also it's more mature code. Version 0.4 has seen a lot of changes so code is not tried and tested on variety of systems.
Could you please clone this repository and then try running Sunflower by issuing python3 -m sunflower
from the root directory of the repository? I want to make sure code actually works before we hunt for bugs.
That said it's possible Python3 module directory is on Fedora is simply different than what I have specified and that is causing issues.
Had to figure out how to clone a repository, but seems to have worked. 'python3 -m sunflower' came up ok (see screen shot) but not sure if 0.5(63) is the correct release.
It's the latest since you are cloning develop. You could have also just downloaded ZIP and used that instead of cloning. But as long as you got it working. So basically there's nothing wrong with the software itself, just packaging.
Can you provide more information about your distribution? Mainly am interested where the modules are sitting.
It's okay if you don't know where modules are installed. I'll do the necessary research in that case and try to fix. My distribution of choice is Debian, so I very little experience with RedHat based distributions and their directory structure, which causes issues like this.
After I removed the old version and related rpm's, I installed the new version and then ran "updatedb" and "locate sunflower" to hopefully show you where things are installed. Also did a "locate Sunflower" but nothing found. The first two entries in the listing are in a btrfs snapshot I took before starting on sunflower. The listing is a little long to include here, so I loaded it out to a web site I maintain. (url deleted) (I got hooked on Red Hat back when it was the only distro that would run on an IBM mainframe.) Edit: strange things occurring after return from linking to the above url. Deleting it, try this: srmsc.org/test/locate_sunflower.txt
And here is a "locate python3" srmsc.org/test/locate_python3.txt (I deleted all the duplicate entries that it found in my snapshot.)
Not really what I had in mind, but thanks for quick response. I know where Sunflower installs because I control that path. Issue here is that I am installing it in wrong place on Fedora.
I'll download Fedora today and test it out. I think I have 22 or 20 installed, which is probably the reason why path is wrong.
I have the same problem running Sunflower on Fedora 33 (I installed the https://sunflower-fm.org/pub/sunflower-0.4.62-2.noarch.rpm RPM file):
dejan@mrak$ sunflower
Traceback (most recent call last):
File "/usr/local/bin/sunflower", line 4, in <module>
runpy.run_module('sunflower', run_name='__main__', alter_sys=True)
File "/usr/lib64/python3.9/runpy.py", line 206, in run_module
mod_name, mod_spec, code = _get_module_details(mod_name)
File "/usr/lib64/python3.9/runpy.py", line 141, in _get_module_details
raise error("No module named %s" % mod_name)
ImportError: No module named sunflower
Maybe a good idea is to put it on PyPI so that we can install it with simple pip3 install sunflower
?
At the moment I am running it directly from the master branch, and it works pretty well so far.
@dejlek there was an effort made to push it to PyPI, even though am not such a big fan of it, but creating setup.py
script is not as easy as it looks, especially when it comes to non-Python dependencies. Sunflower requires some introspection files which are available in official repositories but are not in PyPI and I have not yet found a way around that issue.
That said, Sunflower's behavior on your machine only confirms my assumption that RPM package itself is broken which I will try to fix later today after installing Fedora 33.
Okay, fix won't be done today. Basically what is happening is Python3 on Fedora 33 has its module directory set to /usr/lib/python3.9/site-packages
. Which means in order to support it properly, I need to detect this directory during installation. I need to figure out the best way to do this. There is currently %py3_install
macro, which might be an easy way out, but I have to test it to make sure it works properly.
I wonder should I make the same issue on GitLab? It is confusing to have two places for issues...
No need. I handle both easily. Originally I meant to migrate there, but community keeps using this repository for reporting issues. And I use GitLab primarily as I don't wish to depend on Microsoft's mercy.
I prefer GitLab too.
This should be fixed by recent commits.
system log entries:
Dec 09 02:41:23 bpcc9395.localdomain systemd[1585]: Started Application launched by gnome-shell. Dec 09 02:41:23 bpcc9395.localdomain python3[2829]: detected unhandled Python exception in '/usr/local/bin/sunflower' Dec 09 02:41:23 bpcc9395.localdomain sunflower.desktop[2829]: Traceback (most recent call last): Dec 09 02:41:23 bpcc9395.localdomain sunflower.desktop[2829]: File "/usr/local/bin/sunflower", line 4, in
Dec 09 02:41:23 bpcc9395.localdomain sunflower.desktop[2829]: runpy.run_module('sunflower', run_name='main', alter_sys=True)
Dec 09 02:41:23 bpcc9395.localdomain sunflower.desktop[2829]: File "/usr/lib64/python3.9/runpy.py", line 206, in run_module
Dec 09 02:41:23 bpcc9395.localdomain sunflower.desktop[2829]: mod_name, mod_spec, code = _get_module_details(mod_name)
Dec 09 02:41:23 bpcc9395.localdomain sunflower.desktop[2829]: File "/usr/lib64/python3.9/runpy.py", line 141, in _get_module_details
Dec 09 02:41:23 bpcc9395.localdomain sunflower.desktop[2829]: raise error("No module named %s" % mod_name)
Dec 09 02:41:23 bpcc9395.localdomain sunflower.desktop[2829]: ImportError: No module named sunflower
Dec 09 02:41:23 bpcc9395.localdomain systemd[1585]: app-gnome-sunflower-2829.scope: Succeeded.
Dec 09 02:41:23 bpcc9395.localdomain abrt-server[2831]: Package 'sunflower' isn't signed with proper key
Dec 09 02:41:23 bpcc9395.localdomain abrt-server[2831]: 'post-create' on '/var/spool/abrt/Python3-2020-12-09-02:41:23-2829' exited with 1
Dec 09 02:41:23 bpcc9395.localdomain abrt-server[2831]: Deleting problem directory '/var/spool/abrt/Python3-2020-12-09-02:41:23-2829'