aroberge / easygui_qt

Inspired by easygui, designed for PyQt
BSD 3-Clause "New" or "Revised" License
61 stars 18 forks source link

error message in get_file_names #35

Open kitebuggylux opened 2 years ago

kitebuggylux commented 2 years ago

Hello

Thanks for this wonderful project. It is exactly what I searched for replacing some bash scripts using kdialog. Unfortunately, I've got an error message using get_file_names() on Linux:

>>> easy.get_file_names()
QSettings::value: Empty key passed
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/alex/.local/lib/python3.9/site-packages/easygui_qt/easygui_qt.py", line 751, in get_file_names
    files = qt_widgets.QFileDialog.getOpenFileNames(None, title, os.getcwd(),
TypeError: getOpenFileNames(parent: QWidget = None, caption: str = '', directory: str = '', filter: str = '', initialFilter: str = '', options: Union[QFileDialog.Options, QFileDialog.Option] = 0): argument 5 has unexpected type 'Options'

Same thing with the function get_save_file_name()

System is:

Linux 5.13.19-2-MANJARO x86_64 with KDE (Qt 5.15.2)

Thanks for your help

aroberge commented 2 years ago

I have not updated this project for close to 4 years now. Last time I worked on it, I was using Qt version 4, as I mentioned in https://github.com/aroberge/easygui_qt/issues/20. You are using Qt version 5 (version 4 is likely obsolete) and I am not surprised that there are some incompatibilities.

Unfortunately, I no longer have the time to work on this project. I leave it open in case others wanted to fork it (or make pull requests) and make it compatible with newer versions of Qt.

kitebuggylux commented 2 years ago

Oh, I'm sorry. This is a very interesting project. Do you know any people, who forked it and where it's still maintained?

Thank you.

aroberge commented 2 years ago

https://github.com/schellenberg/easygui_qt/commits/master seems to have made a version compatible with Qt 5. I can't see any forks that are maintained unfortunately.

I created this simply because I wanted to learn about Qt but never used Qt afterwards.

kitebuggylux commented 2 years ago

So, how can I install the version of schellenberg to try it out? I installed your version through pip.

aroberge commented 2 years ago

I think you can get it from https://pypi.org/project/cs20-easygui/

kitebuggylux commented 2 years ago

You helped me a lot.

Thank you.