Bug 25356 - python2 wxPython/wxWidgets release number mismatch
Summary: python2 wxPython/wxWidgets release number mismatch
Status: RESOLVED WONTFIX
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 7
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-26 00:09 CEST by Tony Blackwell
Modified: 2019-08-26 13:37 CEST (History)
1 user (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments

Description Tony Blackwell 2019-08-26 00:09:47 CEST
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
Comment 1 Tony Blackwell 2019-08-26 00:49:37 CEST
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
Comment 2 Jani Välimaa 2019-08-26 07:59:20 CEST
(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

Comment 3 Jani Välimaa 2019-08-26 08:02:21 CEST
(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.
Comment 4 Jani Välimaa 2019-08-26 08:07:58 CEST
(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).
Comment 5 Tony Blackwell 2019-08-26 08:52:44 CEST
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
Comment 6 Jani Välimaa 2019-08-26 13:37:26 CEST
Closing as WONTFIX.

Status: NEW => RESOLVED
Resolution: (none) => WONTFIX


Note You need to log in before you can comment on or make changes to this bug.