Bug report #18180
Python 3.5 specific internal command scandir is being used while running Python 3.4.6
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Victor Olaya | ||
Category: | Processing/Modeller | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Linux, Ubuntu 14.10 | Easy fix?: | Yes |
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 26071 |
Description
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.
Associated revisions
[processing] don't use scandir() to get directory contents (fix #18180)
History
#1 Updated by Alexander Bruy over 6 years ago
- % Done changed from 0 to 100
- Status changed from Open to Closed
Applied in changeset qgis|a554409edeaf23f654ec6aa387808840152f905d.
#2 Updated by Giovanni Manghi over 6 years ago
- Resolution set to fixed/implemented