Context: Trying to import data to gnucash using Jonathan Corbet's excellent (LWN) scripts. see https://lwn.net/Articles/729088/for a key article to his series. The conversion scripts are "available under the GPL; they can be cloned from the repository at git://git.lwn.net/qb-escape.git." ) These I think are python 2 scripts, but instantly fall over with: File "./qb_iif_to_gc", line 18, in <module> import gnucash ImportError: No module named gnucash This is untrue: guncash and related files are installed. Fired up /usr/bin/python in help mode: help> modules Please wait a moment while I gather a list of all available modules... /usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py:16629: UserWarning: wxPython/wxWidgets release number mismatch warnings.warn("wxPython/wxWidgets release number mismatch") *** so it looks as if M7 has not set up python2 correctly.*** Would be timely to see this fixed. Its tax time! Tony
Hmm... My M7 python modules are: usr/lib64/python3.7/site-packages/gnucash /usr/lib64/python3.7/site-packages/gnucash/gnucash_core_c.py /usr/lib64/python3.7/site-packages/gnucash/gnucash_core.py /usr/lib64/python3.7/site-packages/gnucash/__pycache__/gnucash_core_c.cpython-37.pyc /usr/lib64/python3.7/site-packages/gnucash/__pycache__/gnucash_core.cpython-37.pyc /usr/lib64/python3.7/site-packages/gnucash/__pycache__/gnucash_core_c.cpython-37.opt-1.pyc /usr/lib64/python3.7/site-packages/gnucash/__pycache__/gnucash_business.cpython-37.opt-1.pyc /usr/lib64/python3.7/site-packages/gnucash/__pycache__/gnucash_core.cpython-37.opt-1.pyc /usr/lib64/python3.7/site-packages/gnucash/__pycache__/gnucash_business.cpython-37.pyc /usr/lib64/python3.7/site-packages/gnucash/gnucash_business.py There is no corresponding python2.7/site-packages/gnucash directory, and no python2-gnucash in the M7 repository, which just offers python3-gnucash. M6 contained python2-gnucash-2.6.19-1.mga6.x86_64.rpm with its dependencies. Could we please have this or its successor and dependencies added to M7 repositories Tony
(In reply to Tony Blackwell from comment #0) > Fired up /usr/bin/python in help mode: > help> modules > Please wait a moment while I gather a list of all available modules... > /usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py:16629: > UserWarning: wxPython/wxWidgets release number mismatch > warnings.warn("wxPython/wxWidgets release number mismatch") > > *** so it looks as if M7 has not set up python2 correctly.*** > That's only a _warning_ that says wxPython version differs from wxWidgets version. wxPython 3.0.2.0 wxWidgets 3.0.4 So it has very little to do with your 'issue'.
CC: (none) => jani.valimaa
(In reply to Tony Blackwell from comment #1) > > There is no corresponding python2.7/site-packages/gnucash directory, and no > python2-gnucash in the M7 repository, which just offers python3-gnucash. > > M6 contained > python2-gnucash-2.6.19-1.mga6.x86_64.rpm > with its dependencies. > > Could we please have this or its successor and dependencies added to M7 > repositories Python2 is EOL'ing in 2020 and we're trying to slowly get rid of it and port all of our pkgs to python3. That's what you should also try. So, the answer for this request is unfortunately no.
(In reply to Tony Blackwell from comment #0) > Context: Trying to import data to gnucash using Jonathan Corbet's > excellent (LWN) scripts. see > https://lwn.net/Articles/729088/for a key article to his series. The > conversion scripts are > "available under the GPL; they can be cloned from the repository at > git://git.lwn.net/qb-escape.git." ) > > These I think are python 2 scripts, but instantly fall over with: > > File "./qb_iif_to_gc", line 18, in <module> > import gnucash > ImportError: No module named gnucash > As stated in comment 3, we're trying to get rid of python2. So, try to run this script with python3 instead: python3 ./qb_iif_to_gc If it's not working you can try to port the script to python3 with a tool called 2to3 (or 2to3-3.7 from python3 pkg).
Ah well, understand that. Ran into early syntax problems using python3. Already tried 2to3, lots of errors. I've explored with the script author whether he has any interest in upgrading scripts to py3 - waiting to hear, but would be at his leisure. Could always reinstall M6 on a box somewhere3, but seems retrograde. :-( Thanks for your prompt replies. Someone else will need to close the bug with Won't Do, I think. (Can't see that as an option for me). Regards, Tony
Closing as WONTFIX.
Status: NEW => RESOLVEDResolution: (none) => WONTFIX