Hi Dan.
FYI, I followed the instructions https://chirp.danplanet.com/projects/chirp/wiki/DevelopersPython3Environment... and I'm getting a similar error.
The Linux instructions fail at first, so I checked out the py3 branch like the Windows instructions on the same page give. Then I can run the chirpwx.py file.
then i get the following error.
[boucha@esqueleto chirp (py3 u=)]$ ./chirpwx.py Gtk-Message: 16:55:54.177: Failed to load module "xapp-gtk3-module" Traceback (most recent call last): File "/home/boucha/repos/chirp/chirp/wxui/main.py", line 812, in _menu_open with wx.FileDialog(self, _('Open a file'), TypeError: FileDialog(): argument 3 has unexpected type 'PosixPath'
I'm on Python 3.10.6 on Ubuntu 22.04
[boucha@esqueleto chirp (py3 u=)]$ python3 -V Python 3.10.6
[boucha@esqueleto chirp (py3 u=)]$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.1 LTS Release: 22.04 Codename: jammy
On Wed, Dec 14, 2022 at 4:56 PM Dan Smith via chirp_devel < chirp_devel@intrepid.danplanet.com> wrote:
PosixPath comes from pathlib:
import pathlib pathlib.PosixPath
<class 'pathlib.PosixPath'>
But I don't think you should be seeing it in this section of code,
unless there's some confusion between chirp's platform module and the python one. Not sure how or why you're seeing that though.
Gah, sorry, I forgot @vishwin introduced Path to our platform module here:
https://github.com/kk7ds/chirp/pull/196
I'll need to go dig into that to see if we should be doing something else. Perhaps you're on an older python and importlib_resources behaves differently than my native one in python 3.10. So yeah, let me know which macos you're on and where you got python (and which version) so I can try to narrow it down.
PosixPath can be str()'d to get just a path string, so perhaps that's all we need to do there.
--Dan _______________________________________________ chirp_devel mailing list chirp_devel@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_devel Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers