g4ixt / QtTinySA

A Python 'TinySA' GUI programme using Qt5 and PyQt5
GNU General Public License v3.0
106 stars 26 forks source link

unexpected keyword argument 'ensure_exists' #54

Closed sec0ps closed 5 months ago

sec0ps commented 5 months ago

Hi - had this working previously. Installed on a new laptop running same distro and having the following issues. Any help with this would be appreciated.

$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.4 LTS Release: 22.04 Codename: jammy

$ ./QtTinySA.py Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. Traceback (most recent call last): File "/vapt/wireless/QtTinySA/./QtTinySA.py", line 1142, in config = database() File "/vapt/wireless/QtTinySA/./QtTinySA.py", line 731, in init self.personalDir = platformdirs.user_config_dir(appname=app.applicationName(), ensure_exists=True) TypeError: user_config_dir() got an unexpected keyword argument 'ensure_exists'

g4ixt commented 5 months ago

It happens if 'platformdirs' is an old version. Try updating it.

g4ixt commented 5 months ago

Let me know if that doesn't work

sec0ps commented 5 months ago

$ pip install platformdirs

Requirement already satisfied: platformdirs in ./.local/lib/python3.10/site-packages (3.0.0)

What version should it be, this was installed based on the requirements from github

Thanks,

Keith

An adversary is most vulnerable to detection and disruption just prior to an attack. - Red Team Rule #24

From: Ian @.> Sent: Monday, June 3, 2024 4:39 PM To: g4ixt/QtTinySA @.> Cc: Keith Pachulski @.>; Author @.> Subject: Re: [g4ixt/QtTinySA] unexpected keyword argument 'ensure_exists' (Issue #54)

It happens if 'platformdirs' is an old version. Try updating it.

— Reply to this email directly, view it on GitHub https://github.com/g4ixt/QtTinySA/issues/54#issuecomment-2146169845 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYIRFO3UF72TMQXND6B6CDZFTO6NAVCNFSM6AAAAABIXAHYR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBWGE3DSOBUGU . You are receiving this because you authored the thread.Message ID: @.***>

g4ixt commented 5 months ago

The version of platformdirs that I have is 3.10.0. The other thing you can do is find line 731 in the python file

"self.personalDir = platformdirs.user_config_dir(appname=app.applicationName(), ensure_exists=True)"

then delete ", ensure_exists=True". Then go into your user .config directory and create a folder called "QtTinySA". For example mine is:

home/ian/.config/QtTinySA

Then the programme ought to work without needing to update platformdirs.

It's annoying that the version of platformdirs in the repositories is so old, because I only added this platformdirs code to satisfy the ubuntu ham radio repository owner's requirement to have a user config folder. I am going to modify QtTinySA in the next release to create the folder in .config using a different method.

sec0ps commented 5 months ago

That fixed it…thank you

Thanks,

Keith

An adversary is most vulnerable to detection and disruption just prior to an attack. - Red Team Rule #24

From: Ian @.> Sent: Friday, June 7, 2024 12:04 PM To: g4ixt/QtTinySA @.> Cc: Keith Pachulski @.>; Author @.> Subject: Re: [g4ixt/QtTinySA] unexpected keyword argument 'ensure_exists' (Issue #54)

The version of platformdirs that I have is 3.10.0. The other thing you can do is find line 731 in the python file

"self.personalDir = platformdirs.user_config_dir(appname=app.applicationName(), ensure_exists=True)"

then delete ", ensure_exists=True". Then go into your user .config directory and create a folder called "QtTinySA". For example mine is:

home/ian/.config/QtTinySA

Then the programme ought to work without needing to update platformdirs.

It's annoying that the version of platformdirs in the repositories is so old, because I only added this platformdirs code to satisfy the ubuntu ham radio repository owner's requirement to have a user config folder. I am going to modify QtTinySA in the next release to create the folder in .config using a different method.

— Reply to this email directly, view it on GitHub https://github.com/g4ixt/QtTinySA/issues/54#issuecomment-2155211327 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYIRFIKQTIJ7U2V5Y376DTZGHRWJAVCNFSM6AAAAABIXAHYR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJVGIYTCMZSG4 . You are receiving this because you authored the thread.Message ID: @.***>

g4ixt commented 5 months ago

version 0.10.5 in the development branch now works with versions of 'platformdirs' as old as 2.5.1 (and has new feature to view screenshots and download files from the tinySA). I will update the main branch to this version in the next few days.