easygui_qt icon indicating copy to clipboard operation
easygui_qt copied to clipboard

error message in get_file_names

Open kitebuggylux opened this issue 3 years ago • 6 comments

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

kitebuggylux avatar Dec 20 '21 20:12 kitebuggylux

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.

aroberge avatar Dec 20 '21 20:12 aroberge

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.

kitebuggylux avatar Dec 20 '21 21:12 kitebuggylux

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.

aroberge avatar Dec 20 '21 21:12 aroberge

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

kitebuggylux avatar Dec 20 '21 21:12 kitebuggylux

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

aroberge avatar Dec 20 '21 21:12 aroberge

You helped me a lot.

Thank you.

kitebuggylux avatar Dec 20 '21 21:12 kitebuggylux