https://bugs.kde.org/show_bug.cgi?id=399785
Bug ID: 399785
Summary: Scripter errors if script file lacks .py extension
Product: krita
Version: 4.1.5
Platform: Appimage
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: Scripting
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
SUMMARY
When I save a script written in the Scripter with a filename that doesn't
explicitly end with .py (even though the "files of type" field is "python file
(*.py)"), the script doesn't run anymore but gives an error message.
STEPS TO REPRODUCE
1. open Tools > Scripts > Scripter
2. write print("test")
3. Save As "foo" (no .py extension)
4. run by clicking the arrow icon
OBSERVED RESULT
======================================
**********************
AttributeError: 'NoneType' object has no attribute 'loader'
In file: <frozen importlib._bootstrap>
In function: module_from_spec at line: 574. Line with error:
**********************
EXPECTED RESULT
test
SOFTWARE VERSIONS
Qt Version: 5.10.0
Python2: 2.7.15
Python3: 3.6.6
--
You are receiving this mail because:
You are watching all bug changes.