Closed PTFish8 closed 1 year ago
Error is prompted before the picture returns
I am getting the same error. The images are being generated in \auto-sd-krita\outputs\txt2img-images, but I get the popup error and no image in the software until I close the error. In my registry, @ HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem, the LongPathsEnabled is set to 1.
I missed something out while converting from sending file paths to the actual images itself. For now, disabling automatically delete debug files
under the config tab will work. I will later be changing it to instead not save input/output images by default instead of saving it then clearing it later.
this is screenshot:
this is content:
ValueError Python 3.8.1: C:\Program Files\Krita (x64)\bin\krita.exe Sat Oct 22 02:10:09 2022
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:\Users\Name\AppData\Roaming\krita\pykrita\krita_diff\script.py in cb() 262 self.update_selection() 263 self.adjust_selection() 264 self.apply_img2img(mode=0) 265 self.create_mask_layer_workaround() 266 self.set_status(STATE_IMG2IMG) self =
self.apply_img2img = <bound method Script.apply_img2img of >
mode undefined
C:\Users\Name\AppData\Roaming\krita\pykrita\krita_diff\script.py in apply_img2img(self=, mode=0)
207 self.clear_temp_images([path, mask_path, outputs])
208 else:
209 self.clear_temp_images([path, outputs])
210 self.doc.refreshProjection()
211
self =
self.clear_temp_images = <bound method Script.clear_temp_images of >
path = r'C:\Program My\auto-sd-krita-master\outputs\krita-in\1666375779.png'
outputs = ['iVBORw0KGgoAAAANSUhEUgAAAgAAAAMACAIAAADdbUgZAAEA...zWIYOQwm3LGSTWW8MvPx/Ad8GIip1S60uAAAAAElFTkSuQmCC', 'iVBORw0KGgoAAAANSUhEUgAAAgAAAAMACAIAAADdbUgZAAEA...J0lkKeQ7G2oXcwSLA6f8HvbGvOrOZ5MEAAAAASUVORK5CYII=']
C:\Users\Name\AppData\Roaming\krita\pykrita\krita_diff\script.py in clear_temp_images(self=, files=[r'C:\Program My\auto-sd-krita-master\outputs\krita-in\1666375779.png', 'iVBORw0KGgoAAAANSUhEUgAAAgAAAAMACAIAAADdbUgZAAEA...zWIYOQwm3LGSTWW8MvPx/Ad8GIip1S60uAAAAAElFTkSuQmCC', 'iVBORw0KGgoAAAANSUhEUgAAAgAAAAMACAIAAADdbUgZAAEA...J0lkKeQ7G2oXcwSLA6f8HvbGvOrOZ5MEAAAAASUVORK5CYII='])
239 if self.cfg("delete_temp_files", bool):
240 for file in files:
241 os.remove(file)
242
243 # Actions
global os = <module 'os' from 'C:\Program Files\Krita (x64)\python\python38.zip\os.pyc'>
os.remove =
file = 'iVBORw0KGgoAAAANSUhEUgAAAgAAAAMACAIAAADdbUgZAAEA...zWIYOQwm3LGSTWW8MvPx/Ad8GIip1S60uAAAAAElFTkSuQmCC'
ValueError: remove: path too long for Windows
cause = None
class = <class 'ValueError'>
context = None
delattr = <method-wrapper 'delattr' of ValueError object>
dict = {}
dir =
doc = 'Inappropriate argument value (of correct type).'
eq = <method-wrapper 'eq' of ValueError object>
format =
ge = <method-wrapper 'ge' of ValueError object>
getattribute = <method-wrapper 'getattribute' of ValueError object>
gt = <method-wrapper 'gt' of ValueError object>
hash = <method-wrapper 'hash' of ValueError object>
init = <method-wrapper 'init' of ValueError object>
init_subclass = <built-in method init_subclass of type object>
le = <method-wrapper 'le' of ValueError object>
lt = <method-wrapper 'lt' of ValueError object>
ne = <method-wrapper 'ne' of ValueError object>
new =
reduce =
reduce_ex = <built-in method reduce_ex of ValueError object>
repr = <method-wrapper 'repr' of ValueError object>
setattr = <method-wrapper 'setattr' of ValueError object>
setstate =
sizeof =
str = <method-wrapper 'str' of ValueError object>
subclasshook =
__suppress_context = False
traceback__ =
args = ('remove: path too long for Windows',)
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 "C:\Users\Name\AppData\Roaming\krita\pykrita\krita_diff\script.py", line 264, in cb self.apply_img2img(mode=0) File "C:\Users\Name\AppData\Roaming\krita\pykrita\krita_diff\script.py", line 209, in apply_img2img self.clear_temp_images([path, *outputs]) File "C:\Users\Name\AppData\Roaming\krita\pykrita\krita_diff\script.py", line 241, in clear_temp_images os.remove(file) ValueError: remove: path too long for Windows