**Operating system**: Linux
**wxPython version & source**: wx-config --version…-full 3.1.5.0 and git 64e5d863f7833f10df6a0fbcf3221a730562224b
**Python version & source**: 3.9.5
**Description of the problem**:
```
import wx.__version__
__version__ = wx.__version__.VERSION_STRIN
```
Crash:
<details>
<summary>Crash Log</summary>
```
Traceback (most recent call last):
File "ssss.py", line 1, in <module>
import wx.__version__
File "/usr/lib/python3.9/site-packages/wx/__init__.py", line 17, in <module>
from wx.core import *
File "/usr/lib/python3.9/site-packages/wx/core.py", line 12, in <module>
from ._core import *
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 261: invalid start byte
free(): invalid pointer
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=65, ...}, AT_EMPTY_PATH) = 0
ioctl(3, TCGETS, 0x7ffd5bc23ed0) = -1 ENOTTY (Inappropriate ioctl for device)
lseek(3, 0, SEEK_CUR) = 0
fcntl(3, F_DUPFD_CLOEXEC, 0) = 4
fcntl(4, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE)
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=65, ...}, AT_EMPTY_PATH) = 0
read(4, "import wx.__version__\n__version_"..., 4096) = 65
close(4) = 0
lseek(3, 0, SEEK_SET) = 0
read(3, "import wx.__version__\n__version_"..., 8192) = 65
close(3) = 0
write(2, " import wx.__version__\n", 26 import wx.__version__
) = 26
write(2, " File \"/usr/lib/python3.9/site-"..., 79 File "/usr/lib/python3.9/site-packages/wx/__init__.py", line 17, in <module>
) = 79
openat(AT_FDCWD, "/usr/lib/python3.9/site-packages/wx/__init__.py", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=621, ...}, AT_EMPTY_PATH) = 0
ioctl(3, TCGETS, 0x7ffd5bc23ed0) = -1 ENOTTY (Inappropriate ioctl for device)
lseek(3, 0, SEEK_CUR) = 0
fcntl(3, F_DUPFD_CLOEXEC, 0) = 4
fcntl(4, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE)
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=621, ...}, AT_EMPTY_PATH) = 0
read(4, "#-------------------------------"..., 4096) = 621
close(4) = 0
lseek(3, 0, SEEK_SET) = 0
read(3, "#-------------------------------"..., 8192) = 621
close(3) = 0
write(2, " from wx.core import *\n", 26 from wx.core import *
) = 26
write(2, " File \"/usr/lib/python3.9/site-"..., 75 File "/usr/lib/python3.9/site-packages/wx/core.py", line 12, in <module>
) = 75
openat(AT_FDCWD, "/usr/lib/python3.9/site-packages/wx/core.py", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=140158, ...}, AT_EMPTY_PATH) = 0
ioctl(3, TCGETS, 0x7ffd5bc23ed0) = -1 ENOTTY (Inappropriate ioctl for device)
lseek(3, 0, SEEK_CUR) = 0
fcntl(3, F_DUPFD_CLOEXEC, 0) = 4
fcntl(4, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE)
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=140158, ...}, AT_EMPTY_PATH) = 0
read(4, "# This file is generated by wxPy"..., 4096) = 4096
close(4) = 0
lseek(3, 0, SEEK_SET) = 0
read(3, "# This file is generated by wxPy"..., 8192) = 8192
close(3) = 0
write(2, " from ._core import *\n", 25 from ._core import *
) = 25
write(2, "UnicodeDecodeError: 'utf-8' code"..., 93UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 261: invalid start byte
) = 93
rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f88b2495da0}, {sa_handler=0x7f88b26f9850, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f88b2495da0}, 8) = 0
writev(2, [{iov_base="free(): invalid pointer", iov_len=23}, {iov_base="\n", iov_len=1}], 2free(): invalid pointer
) = 24
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f88b2a08000
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0
getpid() = 101661
gettid() = 101661
tgkill(101661, 101661, SIGABRT) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=101661, si_uid=1000} ---
+++ killed by SIGABRT (core dumped) +++
(gdb) bt
#0 0x00007f0619a02d22 in raise () at /usr/lib/libc.so.6
#1 0x00007f06199ec862 in abort () at /usr/lib/libc.so.6
#2 0x00007f0619a44d28 in __libc_message () at /usr/lib/libc.so.6
#3 0x00007f0619a4c92a in () at /usr/lib/libc.so.6
#4 0x00007f0619a4dcfc in _int_free () at /usr/lib/libc.so.6
#5 0x00007f0619a519e8 in free () at /usr/lib/libc.so.6
#6 0x00007f0619ca6407 in PyObject_Free () at /usr/lib/libpython3.9.so.1.0
#7 0x00007f0619da33ae in () at /usr/lib/libpython3.9.so.1.0
#8 0x00007f0619cade77 in () at /usr/lib/libpython3.9.so.1.0
#9 0x00007f0619d7955e in () at /usr/lib/libpython3.9.so.1.0
#10 0x00007f0619da8cba in PyGC_Collect () at /usr/lib/libpython3.9.so.1.0
#11 0x00007f0619da6b99 in Py_FinalizeEx () at /usr/lib/libpython3.9.so.1.0
#12 0x00007f0619d9e618 in Py_RunMain () at /usr/lib/libpython3.9.so.1.0
#13 0x00007f0619d6fae9 in Py_BytesMain () at /usr/lib/libpython3.9.so.1.0
#14 0x00007f06199edb25 in __libc_start_main () at /usr/lib/libc.so.6
#15 0x000055d1d686604e in _start ()
```
</details>