Skip to content

AttributeError: 'Document' object has no attribute 'setCurrentTime' #21

@thebossfeldman

Description

@thebossfeldman

Hello! I've started working on some game dev things and really enjoy using Krita to make my images. Today I decided to try and figure out how to animate with it and came across your plugin as a way to export as spritesheets. Unfortunately I'm having an error whenever I try to export that looks like this:

pluggin error screenshot

and contains the following:

AttributeError
Python 3.6.2: python
Tue Jun 27 13:19:55 2023

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

D:\programs\Krita\Krita (x64)\share\krita\pykrita\spritesheetExporter\uispritesheetexporter.py in confirmButton(self=<spritesheetExporter.uispritesheetexporter.UISpritesheetExporter object>)
411 else:
412 # important: we reset spritesheetexporter's spritesExportDir
413 self.exp.spritesExportDir = self.exp.defaultPath
414 self.exp.export()
415 self.mainDialog.hide()
self = <spritesheetExporter.uispritesheetexporter.UISpritesheetExporter object>
self.exp = <spritesheetExporter.spritesheetexporter.SpritesheetExporter object>
self.exp.export = <bound method SpritesheetExporter.export of <spr....spritesheetexporter.SpritesheetExporter object>>

D:\programs\Krita\Krita (x64)\share\krita\pykrita\spritesheetExporter\spritesheetexporter.py in export(self=<spritesheetExporter.spritesheetexporter.SpritesheetExporter object>, debugging=False)
203 if(self.end == self.defaultTime or self.start == self.defaultTime):
204 self.setStartEndFrames()
205 doc.setCurrentTime(self.start)
206 if(debugging):
207 ver = Application.version ()
doc = <PyKrita.krita.Document object>
doc.setCurrentTime undefined
self = <spritesheetExporter.spritesheetexporter.SpritesheetExporter object>
self.start = 0
AttributeError: 'Document' object has no attribute 'setCurrentTime'
cause = None
class = <class 'AttributeError'>
context = None
delattr = <method-wrapper 'delattr' of AttributeError object>
dict = {}
dir =
doc = 'Attribute not found.'
eq = <method-wrapper 'eq' of AttributeError object>
format =
ge = <method-wrapper 'ge' of AttributeError object>
getattribute = <method-wrapper 'getattribute' of AttributeError object>
gt = <method-wrapper 'gt' of AttributeError object>
hash = <method-wrapper 'hash' of AttributeError object>
init = <method-wrapper 'init' of AttributeError object>
init_subclass =
le = <method-wrapper 'le' of AttributeError object>
lt = <method-wrapper 'lt' of AttributeError object>
ne = <method-wrapper 'ne' of AttributeError object>
new =
reduce =
reduce_ex =
repr = <method-wrapper 'repr' of AttributeError object>
setattr = <method-wrapper 'setattr' of AttributeError object>
setstate =
sizeof =
str = <method-wrapper 'str' of AttributeError object>
subclasshook =
suppress_context = False
traceback =
args = ("'Document' object has no attribute 'setCurrentTime'",)
with_traceback =

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

Traceback (most recent call last):
File "D:\programs\Krita\Krita (x64)\share\krita\pykrita\spritesheetExporter\uispritesheetexporter.py", line 414, in confirmButton
self.exp.export()
File "D:\programs\Krita\Krita (x64)\share\krita\pykrita\spritesheetExporter\spritesheetexporter.py", line 205, in export
doc.setCurrentTime(self.start)
AttributeError: 'Document' object has no attribute 'setCurrentTime'

I'm using Godot script but for all its similarities python is still pretty hard for me to parse. I figured I'd drop this here and animate a different way for now. Very cool plugin idea though, glad you're making it possible!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions