Ich habe es versucht
Code: Select all
if len(sys.argv) > 1:
o = sys.argv[1] #FrameXPWindow(image="output - Copy.png",title="how cool",maximize=4)
else:
o = FrameXPWindow(image="output - Copy.png",title="how cool",maximize=4)
Code: Select all
o = FrameXPWindow(image="output - Copy.png",title="how cool",maximize=4)
Code: Select all
E:\Downloads\WindowCreator-main\WindowCreator-main>python generate.py CreateXPWindow(0,0,captiontext="",errortext="This is an example error")
Traceback (most recent call last):
File "E:\Downloads\WindowCreator-main\WindowCreator-main\generate.py", line 1462, in
o.save("output.png")
^^^^^^
AttributeError: 'str' object has no attribute 'save'
zu speichern
Code: Select all
if len(sys.argv) > 1:
o = PIL.Image.Image(sys.argv[1]) #FrameXPWindow(image="output - Copy.png",title="how cool",maximize=4)
else:
o = FrameXPWindow(image="output - Copy.png",title="how cool",maximize=4)
Code: Select all
Traceback (most recent call last):
File "E:\Downloads\WindowCreator-main\WindowCreator-main\generate.py", line 1457, in
o = PIL.Image.Image(sys.argv[1]) #FrameXPWindow(image="output - Copy.png",title="how cool",maximize=4)
^^^
NameError: name 'PIL' is not defined
So erstellen Sie es neu:
- holen Sie sich die ZIP-Datei und extrahieren Sie
- Bearbeiten Sie das Ende des Skripts so, dass es mit den folgenden Versuchen übereinstimmt
- fügen Sie import sys am Anfang hinzu
- in der Befehlszeile, type python generic.py CreateXPWindow(0,0,captiontext="",errortext="This is an example error")