Skip to content
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

Error: AttributeError: module 'wx' has no attribute 'BitmapBundle' #181

Closed
timcooijmans opened this issue Jun 21, 2022 · 14 comments · Fixed by #184
Closed

Error: AttributeError: module 'wx' has no attribute 'BitmapBundle' #181

timcooijmans opened this issue Jun 21, 2022 · 14 comments · Fixed by #184
Labels
bug Something isn't working

Comments

@timcooijmans
Copy link

timcooijmans commented Jun 21, 2022

Hi,

Thank you for this excellent tool. With the latest version (6.0.3) I get the following error while trying to use the plugin on MacOS/OS X. Sadly I never used it before on OS X, so not sure if it's a new error or not. It seems to work on Windows.

Traceback (most recent call last):

File "/Users/username/Documents/KiCad/6.0/3rdparty/plugins/com_github_bouni_kicad-jlcpcb-tools/plugin.py", line 21, in Run
dialog = JLCPCBTools(None)

File "/Users/username/Documents/KiCad/6.0/3rdparty/plugins/com_github_bouni_kicad-jlcpcb-tools/mainwindow.py", line 183, in __init__
loadBitmapScaled(

File "/Users/username/Documents/KiCad/6.0/3rdparty/plugins/com_github_bouni_kicad-jlcpcb-tools/helpers.py", line 53, in loadBitmapScaled
return wx.BitmapBundle(bmp)

AttributeError: module 'wx' has no attribute 'BitmapBundle'
@ayourk
Copy link

ayourk commented Jun 22, 2022

I'm getting something similar:
JLCPCB_plugin-22020603-error

This happens with the latest 2022.06.03 release. Reverting to the 2022.06.02 release fixes the issue (work around).

@Bouni
Copy link
Owner

Bouni commented Jun 22, 2022

@timcooijmans @ayourk

Please always include your KiCAD version Info in issues, without that Its almost impossible to figure out what happened!

KiCAD -> Help -> About Kicad -> Copy version Info

@Bouni Bouni added the more info needed Need more info to resolve this label Jun 22, 2022
@timcooijmans
Copy link
Author

Hi, sorry:


Version: (6.0.6-0), release build

Libraries:
	wxWidgets 3.1.5
	libcurl/7.79.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.11 nghttp2/1.45.1

Platform: macOS Version 12.4 (Build 21F79), 64 bit, Little endian, wxMac

Build Info:
	Date: Jun 19 2022 14:26:31
	wxWidgets: 3.1.5 (wchar_t,wx containers)
	Boost: 1.78.0
	OCC: 7.6.2
	Curl: 7.64.1
	ngspice: 35
	Compiler: Clang 12.0.0 with C++ ABI 1002

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON

@ayourk
Copy link

ayourk commented Jun 22, 2022

And in case you need mine too:

Application: KiCad

Version: 6.0.5-a6ca702e91~116~ubuntu22.04.1, release build

Libraries:
	wxWidgets 3.0.5
	libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.12

Platform: Linux 5.15.0-37-generic x86_64, 64 bit, Little endian, wxGTK, , x11

Build Info:
	Date: May  3 2022 08:42:29
	wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
	Boost: 1.74.0
	OCC: 7.5.2
	Curl: 7.83.0
	ngspice: 36
	Compiler: GCC 11.2.0 with C++ ABI 1016

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON

@Bouni
Copy link
Owner

Bouni commented Jun 22, 2022

😭 It seems that all OSes ship different wx /wxwidgets versions which leads to this kind of errors.
I thought that simply checking the KiCAD version is enough but I need to come up with a better plan 😕
Maybe I check if wx has BitmapBundle and if so use that 🤔

Give me a few hours to work something out!

@Bouni Bouni added bug Something isn't working and removed more info needed Need more info to resolve this labels Jun 22, 2022
@kalanzun
Copy link

Hi! Same error for me on Arch Linux. wxWidgets documentation says, wxBitmapBundle is a new class in version 3.1.6

https://docs.wxwidgets.org/trunk/classwx_bitmap_bundle.html

Application: KiCad Leiterplatteneditor

Version: (6.0.6), release build

Libraries:
	wxWidgets 3.0.5
	libcurl/7.83.1 OpenSSL/1.1.1o zlib/1.2.12 brotli/1.0.9 zstd/1.5.2 libidn2/2.3.2 libpsl/0.21.1 (+libidn2/2.3.0) libssh2/1.10.0 nghttp2/1.47.0

Platform: Linux 5.18.5-zen1-1-zen x86_64, 64 bit, Little endian, wxGTK, gnome, wayland

Build Info:
	Date: Jun 21 2022 02:56:58
	wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
	Boost: 1.79.0
	OCC: 7.5.3
	Curl: 7.83.1
	ngspice: 37
	Compiler: GCC 12.1.0 with C++ ABI 1017

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON

@Bouni
Copy link
Owner

Bouni commented Jun 24, 2022

@timcooijmans @ayourk @kalanzun As you three are on different platforms it would be awesome if you could give PR #184 a try and see if that fixes this issue.

@livigni
Copy link

livigni commented Jun 25, 2022

Same on Mac OS.

Traceback (most recent call last):
File "/Users/vicio/Documents/KiCad/6.0/3rdparty/plugins/com_github_bouni_kicad-jlcpcb-tools/plugin.py", line 21, in Run
dialog = JLCPCBTools(None)

File "/Users/vicio/Documents/KiCad/6.0/3rdparty/plugins/com_github_bouni_kicad-jlcpcb-tools/mainwindow.py", line 183, in __init__
loadBitmapScaled(

File "/Users/vicio/Documents/KiCad/6.0/3rdparty/plugins/com_github_bouni_kicad-jlcpcb-tools/helpers.py", line 53, in loadBitmapScaled
return wx.BitmapBundle(bmp)

AttributeError: module 'wx' has no attribute 'BitmapBundle'
Application: KiCad PCB Editor

Version: (6.0.6-1)-1, release build

Libraries:
	wxWidgets 3.1.5
	libcurl/7.77.0 (SecureTransport) LibreSSL/2.8.3 zlib/1.2.11 nghttp2/1.42.0

Platform: macOS Version 12.1 (Build 21C52), 64 bit, Little endian, wxMac

Build Info:
	Date: Jun 20 2022 17:18:13
	wxWidgets: 3.1.5 (wchar_t,wx containers)
	Boost: 1.78.0
	OCC: 7.6.2
	Curl: 7.64.1
	ngspice: 35
	Compiler: Clang 12.0.0 with C++ ABI 1002

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON

@ayourk
Copy link

ayourk commented Jun 26, 2022

@timcooijmans @ayourk @kalanzun As you three are on different platforms it would be awesome if you could give PR #184 a try and see if that fixes this issue.

What is the build process so I can add this via a Zip file to Kicad?

@Bouni
Copy link
Owner

Bouni commented Jun 26, 2022

You have to install the plugin using git and not via PCM.
Then you can fetch the PR branch and switch to it.
There is a description below the PR how to do that.

@ayourk
Copy link

ayourk commented Jun 26, 2022

You have to install the plugin using git and not via PCM. Then you can fetch the PR branch and switch to it.

I downloaded the PR branch .zip file kicad-jlcpcb-tools-fix-181.zip. How should I reconstruct the .zip?

@kalanzun
Copy link

You may just unpack the zip to your local plugin directory. ~/.local/share/kicad/6.0/scripting/plugins/. KiCAD can run the project directly.

@Bouni
Copy link
Owner

Bouni commented Jun 27, 2022

Make sure you don't have another version installed while you try the PR version. I don't know if they interfere in any way.

@Bouni
Copy link
Owner

Bouni commented Jun 27, 2022

This wx version mess drives me crazy 🤯 I'm still not able to come up wit a solution that works with all versions 😒

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants