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

Python 3.5 specific internal command scandir is being used while running Python 3.4.6 #26071

Closed
qgib opened this issue Feb 23, 2018 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Easy fix Processing Relating to QGIS Processing framework or individual Processing algorithms

Comments

@qgib
Copy link
Contributor

qgib commented Feb 23, 2018

Author Name: Mark Johnson (Mark Johnson)
Original Redmine Issue: 18180
Affected QGIS version: master
Redmine category:processing/modeller
Assignee: Victor Olaya


Python 3.5 specific command scandir is being used when Python 3.4 is being used.
This cause an alert when starting QGIS, but also when closing the settings Dialog.

AttributeError: 'module' object has no attribute 'scandir'
Traceback (most recent call last):
  File ".... /apps_local/qgis_320.spatialite/share/qgis/python/plugins/processing/script/ScriptAlgorithmProvider.py", line 102, in loadAlgorithms
    items = os.scandir(folder)
AttributeError: 'module' object has no attribute 'scandir'

https://docs.python.org/3/library/os.html#os.scandir
New in version 3.5.

Python version: 3.4.6 (default, Oct 28 2017, 03:38:25) [GCC 4.9.1]

The external scandir for pre-3.5 was installed with:
python3 -m pip install scandir

Since only Python 3.0 is a requirement, version dependent code should offer an alternative since many non-Python users not not want to deal (yet again) with another Python error.

@qgib
Copy link
Contributor Author

qgib commented Feb 23, 2018

Author Name: Alexander Bruy (@alexbruy)


Applied in changeset a554409.


  • done_ratio was changed from 0 to 100
  • status_id was changed from Open to Closed

@qgib qgib closed this as completed Feb 23, 2018
@qgib
Copy link
Contributor Author

qgib commented Feb 23, 2018

Author Name: Giovanni Manghi (@gioman)


  • resolution was changed from to fixed/implemented

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms Easy fix labels 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! Easy fix Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

No branches or pull requests

1 participant