<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>408146</bug_id>
          
          <creation_ts>2019-05-31 13:23:20 +0000</creation_ts>
          <short_desc>Script Error - Krita (4.2)</short_desc>
          <delta_ts>2019-06-02 10:08:00 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>krita</product>
          <component>Tools</component>
          <version>4.2.0</version>
          <rep_platform>Microsoft Windows</rep_platform>
          <op_sys>Microsoft Windows</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="James Wright">jwright</reporter>
          <assigned_to name="Krita Bugs">krita-bugs-null</assigned_to>
          <cc>halla</cc>
    
    <cc>jwright</cc>
          
          <cf_commitlink>https://invent.kde.org/kde/krita/commit/6dc8131e0e3a5e0c7f2c42e6b40a6cd8c7cc7384</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1859793</commentid>
    <comment_count>0</comment_count>
    <who name="James Wright">jwright</who>
    <bug_when>2019-05-31 13:23:20 +0000</bug_when>
    <thetext>SUMMARY

Script Error - Krita


STEPS TO REPRODUCE
1. Goto Tools &gt; Scripts &gt; Document Tools 
2. Error screen pops up &quot;Script Error - Krita&quot;
3. SyntaxError: invalid syntax (scaletool.py, line 1)

OBSERVED RESULT
Error Message

EXPECTED RESULT
Document Tools Window

SOFTWARE/OS VERSIONS
Windows: 10 (1809)
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION

Full Test of error...

SyntaxError
Python 3.6.2: python
Fri May 31 09:18:21 2019

A problem occurred in a Python script.  Here is the sequence of
function calls leading up to the error, in the order they occurred.

 C:\Program Files\Krita (x64)\share\krita\pykrita\documenttools\documenttools.py in initialize(self=&lt;documenttools.documenttools.DocumentToolsExtension object&gt;)
   31         action.triggered.connect(self.initialize)
   32 
   33     def initialize(self):
   34         self.uidocumenttools = uidocumenttools.UIDocumentTools()
   35         self.uidocumenttools.initialize()
self = &lt;documenttools.documenttools.DocumentToolsExtension object&gt;
self.uidocumenttools = &lt;documenttools.uidocumenttools.UIDocumentTools object&gt;
self.uidocumenttools.initialize = &lt;bound method UIDocumentTools.initialize of &lt;documenttools.uidocumenttools.UIDocumentTools object&gt;&gt;

 C:\Program Files\Krita (x64)\share\krita\pykrita\documenttools\uidocumenttools.py in initialize(self=&lt;documenttools.uidocumenttools.UIDocumentTools object&gt;)
   49     def initialize(self):
   50         self.loadDocuments()
   51         self.loadTools()
   52 
   53         self.documentLayout.addWidget(self.widgetDocuments)
self = &lt;documenttools.uidocumenttools.UIDocumentTools object&gt;
self.loadTools = &lt;bound method UIDocumentTools.loadTools of &lt;documenttools.uidocumenttools.UIDocumentTools object&gt;&gt;

 C:\Program Files\Krita (x64)\share\krita\pykrita\documenttools\uidocumenttools.py in loadTools(self=&lt;documenttools.uidocumenttools.UIDocumentTools object&gt;)
   83 
   84         for module in modules:
   85             m = importlib.import_module(module[&apos;module&apos;])
   86             toolClass = getattr(m, module[&apos;klass&apos;])
   87             obj = toolClass(self.mainDialog)
m = &lt;module &apos;documenttools.tools.canvassizetool.canv...tools\\tools\\canvassizetool\\canvassizetool.py&apos;&gt;
global importlib = &lt;module &apos;importlib&apos; from &apos;C:\\Program Files\\Kri...\\python\\python36.zip\\importlib\\__init__.pyc&apos;&gt;
importlib.import_module = &lt;function import_module&gt;
module = {&apos;klass&apos;: &apos;ScaleTool&apos;, &apos;module&apos;: &apos;documenttools.tools.scaletool.scaletool&apos;}

 C:\Program Files\Krita (x64)\importlib\__init__.py in import_module(name=&apos;documenttools.tools.scaletool.scaletool&apos;, package=None)


 C:\Program Files\Krita (x64)\&lt;frozen importlib._bootstrap&gt; in _gcd_import(name=&apos;documenttools.tools.scaletool.scaletool&apos;, package=None, level=0)


 C:\Program Files\Krita (x64)\&lt;frozen importlib._bootstrap&gt; in _find_and_load(name=&apos;documenttools.tools.scaletool.scaletool&apos;, import_=&lt;function _gcd_import&gt;)


 C:\Program Files\Krita (x64)\&lt;frozen importlib._bootstrap&gt; in _find_and_load_unlocked(name=&apos;documenttools.tools.scaletool.scaletool&apos;, import_=&lt;function _gcd_import&gt;)


 C:\Program Files\Krita (x64)\&lt;frozen importlib._bootstrap&gt; in _load_unlocked(spec=ModuleSpec(name=&apos;documenttools.tools.scaletool.s...\\documenttools\\tools\\scaletool\\scaletool.py&apos;))


 C:\Program Files\Krita (x64)\&lt;frozen importlib._bootstrap_external&gt; in exec_module(self=&lt;_frozen_importlib_external.SourceFileLoader object&gt;, module=&lt;module &apos;documenttools.tools.scaletool.scaletool...\\documenttools\\tools\\scaletool\\scaletool.py&apos;&gt;)


 C:\Program Files\Krita (x64)\&lt;frozen importlib._bootstrap_external&gt; in get_code(self=&lt;_frozen_importlib_external.SourceFileLoader object&gt;, fullname=&apos;documenttools.tools.scaletool.scaletool&apos;)


 C:\Program Files\Krita (x64)\&lt;frozen importlib._bootstrap_external&gt; in source_to_code(self=&lt;_frozen_importlib_external.SourceFileLoader object&gt;, data=b&apos;/# This script is licensed CC 0 1.0, so that y...          self.strategyComboBox.currentText())\n&apos;, path=r&apos;C:\Program Files\Krita (x64)\share\krita\pykrita\documenttools\tools\scaletool\scaletool.py&apos;, _optimize=-1)


 C:\Program Files\Krita (x64)\&lt;frozen importlib._bootstrap&gt; in _call_with_frames_removed(f=&lt;built-in function compile&gt;, *args=(b&apos;/# This script is licensed CC 0 1.0, so that y...          self.strategyComboBox.currentText())\n&apos;, r&apos;C:\Program Files\Krita (x64)\share\krita\pykrita\documenttools\tools\scaletool\scaletool.py&apos;, &apos;exec&apos;), **kwds={&apos;dont_inherit&apos;: True, &apos;optimize&apos;: -1})

SyntaxError: invalid syntax (scaletool.py, line 1)
    __cause__ = None
    __class__ = &lt;class &apos;SyntaxError&apos;&gt;
    __context__ = None
    __delattr__ = &lt;method-wrapper &apos;__delattr__&apos; of SyntaxError object&gt;
    __dict__ = {}
    __dir__ = &lt;built-in method __dir__ of SyntaxError object&gt;
    __doc__ = &apos;Invalid syntax.&apos;
    __eq__ = &lt;method-wrapper &apos;__eq__&apos; of SyntaxError object&gt;
    __format__ = &lt;built-in method __format__ of SyntaxError object&gt;
    __ge__ = &lt;method-wrapper &apos;__ge__&apos; of SyntaxError object&gt;
    __getattribute__ = &lt;method-wrapper &apos;__getattribute__&apos; of SyntaxError object&gt;
    __gt__ = &lt;method-wrapper &apos;__gt__&apos; of SyntaxError object&gt;
    __hash__ = &lt;method-wrapper &apos;__hash__&apos; of SyntaxError object&gt;
    __init__ = &lt;method-wrapper &apos;__init__&apos; of SyntaxError object&gt;
    __init_subclass__ = &lt;built-in method __init_subclass__ of type object&gt;
    __le__ = &lt;method-wrapper &apos;__le__&apos; of SyntaxError object&gt;
    __lt__ = &lt;method-wrapper &apos;__lt__&apos; of SyntaxError object&gt;
    __ne__ = &lt;method-wrapper &apos;__ne__&apos; of SyntaxError object&gt;
    __new__ = &lt;built-in method __new__ of type object&gt;
    __reduce__ = &lt;built-in method __reduce__ of SyntaxError object&gt;
    __reduce_ex__ = &lt;built-in method __reduce_ex__ of SyntaxError object&gt;
    __repr__ = &lt;method-wrapper &apos;__repr__&apos; of SyntaxError object&gt;
    __setattr__ = &lt;method-wrapper &apos;__setattr__&apos; of SyntaxError object&gt;
    __setstate__ = &lt;built-in method __setstate__ of SyntaxError object&gt;
    __sizeof__ = &lt;built-in method __sizeof__ of SyntaxError object&gt;
    __str__ = &lt;method-wrapper &apos;__str__&apos; of SyntaxError object&gt;
    __subclasshook__ = &lt;built-in method __subclasshook__ of type object&gt;
    __suppress_context__ = False
    __traceback__ = &lt;traceback object&gt;
    args = (&apos;invalid syntax&apos;, (r&apos;C:\Program Files\Krita (x64)\share\krita\pykrita\documenttools\tools\scaletool\scaletool.py&apos;, 1, 1, &apos;/# This script is licensed CC 0 1.0, so that you can learn from it.\n&apos;))
    filename = r&apos;C:\Program Files\Krita (x64)\share\krita\pykrita\documenttools\tools\scaletool\scaletool.py&apos;
    lineno = 1
    msg = &apos;invalid syntax&apos;
    offset = 1
    print_file_and_line = None
    text = &apos;/# This script is licensed CC 0 1.0, so that you can learn from it.\n&apos;
    with_traceback = &lt;built-in method with_traceback of SyntaxError object&gt;

The above is a description of an error in a Python program.  Here is
the original traceback:

Traceback (most recent call last):
  File &quot;C:\Program Files\Krita (x64)\share\krita\pykrita\documenttools\documenttools.py&quot;, line 35, in initialize
    self.uidocumenttools.initialize()
  File &quot;C:\Program Files\Krita (x64)\share\krita\pykrita\documenttools\uidocumenttools.py&quot;, line 51, in initialize
    self.loadTools()
  File &quot;C:\Program Files\Krita (x64)\share\krita\pykrita\documenttools\uidocumenttools.py&quot;, line 85, in loadTools
    m = importlib.import_module(module[&apos;module&apos;])
  File &quot;importlib\__init__.py&quot;, line 126, in import_module
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 978, in _gcd_import
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 961, in _find_and_load
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 950, in _find_and_load_unlocked
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 655, in _load_unlocked
  File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 674, in exec_module
  File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 781, in get_code
  File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 741, in source_to_code
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 205, in _call_with_frames_removed
  File &quot;C:\Program Files\Krita (x64)\share\krita\pykrita\documenttools\tools\scaletool\scaletool.py&quot;, line 1
    /# This script is licensed CC 0 1.0, so that you can learn from it.
    ^
SyntaxError: invalid syntax</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1859795</commentid>
    <comment_count>1</comment_count>
    <who name="Halla Rempt">halla</who>
    <bug_when>2019-05-31 13:25:13 +0000</bug_when>
    <thetext>Thanks for your report, I can confirm the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1859797</commentid>
    <comment_count>2</comment_count>
    <who name="Halla Rempt">halla</who>
    <bug_when>2019-05-31 13:27:47 +0000</bug_when>
    <thetext>Git commit b1f02c7648de6dbce28e795ae10b8eb41219a7d2 by Boudewijn Rempt.
Committed on 31/05/2019 at 13:27.
Pushed by rempt into branch &apos;master&apos;.

Fix typo in Documenttools Python plugin

BACKPORT:krita/4.2

M  +1    -1    plugins/python/documenttools/tools/scaletool/scaletool.py

https://invent.kde.org/kde/krita/commit/b1f02c7648de6dbce28e795ae10b8eb41219a7d2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1860127</commentid>
    <comment_count>3</comment_count>
    <who name="Halla Rempt">halla</who>
    <bug_when>2019-06-02 10:08:00 +0000</bug_when>
    <thetext>Git commit 6dc8131e0e3a5e0c7f2c42e6b40a6cd8c7cc7384 by Boudewijn Rempt.
Committed on 02/06/2019 at 09:37.
Pushed by rempt into branch &apos;krita/4.2&apos;.

Fix typo in Documenttools Python plugin

BACKPORT:krita/4.2
(cherry picked from commit b1f02c7648de6dbce28e795ae10b8eb41219a7d2)

M  +1    -1    plugins/python/documenttools/tools/scaletool/scaletool.py

https://invent.kde.org/kde/krita/commit/6dc8131e0e3a5e0c7f2c42e6b40a6cd8c7cc7384</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>