Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to open files from Python console editor #21994

Closed
qgib opened this issue Dec 13, 2015 · 1 comment
Closed

Unable to open files from Python console editor #21994

qgib opened this issue Dec 13, 2015 · 1 comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! PyQGIS Related to the PyQGIS API

Comments

@qgib
Copy link
Contributor

qgib commented Dec 13, 2015

Author Name: Jesse Taylor (Jesse Taylor)
Original Redmine Issue: 13980
Affected QGIS version: master
Redmine category:pyqgis_console


When I click on the Open File button in the editor dialog in the Python console, QGIS fails to open the file browser and gives the following error:

@> An error has occured while executing Python code:

TypeError: QFileDialog.getOpenFileNames(QWidget parent=None, QString caption=QString(), QString directory=QString(), QString filter=QString(), QString selectedFilter=None, QFileDialog.Options options=0): argument 3 has unexpected type 'QDir'
Traceback (most recent call last):
File "/usr/share/qgis/python/console/console.py", line 639, in openScriptFile
self, openFileTr, lastDirPath, "Script file (*.py)")
TypeError: QFileDialog.getOpenFileNames(QWidget parent=None, QString caption=QString(), QString directory=QString(), QString filter=QString(), QString selectedFilter=None, QFileDialog.Options options=0): argument 3 has unexpected type 'QDir'

Python version: 2.7.9 (default, Mar 1 2015, 13:01:26) [GCC 4.9.2]
QGIS version: 2.12.1-Lyon Lyon, exported

Python Path:
/usr/share/qgis/python/plugins/processing
/usr/share/qgis/python
/home/jesse/.qgis2/python
/home/jesse/.qgis2/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python2.7
/usr/lib/python2.7/plat-x86_64-linux-gnu
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/PILcompat
/usr/lib/python2.7/dist-packages/gtk-2.0
/usr/lib/pymodules/python2.7
/home/jesse/.qgis2//python
/usr/share/qgis/python/plugins/fTools/tools
/home/jesse/gis/MappingWarAtHome@

This is happening on a fresh, default install of Debian 8 Jessie, using the build from:

deb http://qgis.org/debian jessie main
deb-src http://qgis.org/debian jessie main

@qgib
Copy link
Contributor Author

qgib commented Jan 18, 2016

Author Name: Alexander Bruy (@alexbruy)


Works fine in master. Reopen if necessary


  • resolution was changed from to worksforme
  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! PyQGIS Related to the PyQGIS API labels May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! PyQGIS Related to the PyQGIS API
Projects
None yet
Development

No branches or pull requests

1 participant