← Back to team overview

kicad-developers team mailing list archive

Re: Error importing the wxPython API!

 

​Hi Reece-

You probably have a compiled .pyc module hanging around that refers to your
old installation.  You can just delete all pyc files on your system and
this will fix it.  Python will re-compile as needed.

-S​



Am Mi., 6. Juni 2018 um 20:27 Uhr schrieb Reece R. Pollack <reece@xxxxxxx>:

> Hey folks, I've run into an odd problem that I could use some help fixing.
>
> I needed to help test Orson's possible fixes to a critical bug, which we
> were expecting to result in a Git bisect. I cloned my usual development
> repo into a new tree and checked out the "master" branch to avoid any
> possibility of my local changes affecting the tests. In hopes of
> avoiding messing up my normal installation in /usr/local, when I built
> this new tree I specified an installation directory with the
> -DCMAKE_INSTALL_PREFIX=<prefix> option to Cmake. Since it wasn't
> installing in a system directory I didn't use "sudo" during the
> installation of this test version.
>
> I discovered that when starting KiCad from the KDE menu I found it ran
> the test version rather than the version in /usr/local. That was a
> surprise, but not a disaster. Once the testing was over I wanted to go
> back to my regular version installed in /usr/local, so in the test build
> directory I ran "make uninstall". Yet starting KiCad from the KDE menu
> resulted in a project manager that reported the test build version, not
> my locally-modified build version.
>
> Somewhat confused as to what executable was running, I deleted the
> entire test repo. I then went to my local build repo and re-ran "sudo
> make install" which completed successfully. I then started getting the
> expected version from the project manager window and from eeschema.
> However, pcbnew fails with this error:
>
>      *** Error importing the wxPython API! ***
>
> I haven't changed my system configuration recently, so I ran "sudo make
> uninstall", cleaned the build and recompiled everything from scratch,
> and ran "sudo make install". Again the install ran without errors, but I
> still can't run pcbnew. Here's the output from running pcbnew from a
> terminal window:
>
> $ pcbnew
> 23:05:31: Debug: Checking template path
> '/usr/local/share/kicad/template' exists
> 23:05:31: Debug: Adding duplicate image handler for 'PNG file'
> 23:05:31: Debug: Adding duplicate image handler for 'JPEG file'
> 23:05:31: Debug: Adding duplicate image handler for 'TIFF file'
> 23:05:31: Debug: Adding duplicate image handler for 'GIF file'
> 23:05:31: Debug: Adding duplicate image handler for 'PNM file'
> 23:05:31: Debug: Adding duplicate image handler for 'PCX file'
> 23:05:31: Debug: Adding duplicate image handler for 'IFF file'
> 23:05:31: Debug: Adding duplicate image handler for 'Windows icon file'
> 23:05:31: Debug: Adding duplicate image handler for 'Windows cursor file'
> 23:05:31: Debug: Adding duplicate image handler for 'Windows animated
> cursor file'
> 23:05:31: Debug: Adding duplicate image handler for 'TGA file'
> 23:05:31: Debug: Adding duplicate image handler for 'XPM file'
> Traceback (most recent call last):
>    File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/__init__.py",
> line 49, in <module>
>      from wx._core import *
>    File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py", line
> 16923, in <module>
>      from _gdi import *
> ValueError: bad marshal data (unknown type code)
> 23:06:08: Error: pcbnewInitPythonScripting() failed.
> Segmentation fault
>
>
> Have I done something dumb? Is this worth filing a bug report?
>
> -Reece
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>

References