मैं images2gif के साथ काम कर रहा हूं और यह त्रुटि प्राप्त कर रहा हूं। कोई विचार?यूनिकोडडेकोड एरर: 'ascii' कोडेक स्थिति 10 में बाइट 0x87 को डीकोड नहीं कर सकता है: क्रमशः श्रेणी में नहीं (128)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x87 in position 10: ordinal not in range(128)
टेस्ट फ़ाइल:
from PIL import Image
from images2gif import writeGif
FRAMES = 2
FRAME_DELAY = 0.75
WIDTH, HEIGHT = 600, 600
frames = []
img1 = Image.open('1.jpg')
img2 = Image.open('2.jpg')
frames.append(img1)
frames.append(img2)
writeGif("test.gif", frames, duration=FRAME_DELAY, dither=0)
Traceback:
Traceback (most recent call last):
File "gif.py", line 15, in <module>
writeGif("topmovie.gif", frames, duration=FRAME_DELAY, dither=0)
File "/Users/Craig/Documents/github/RTB/images2gif.py", line 575, in writeGif
gifWriter.writeGifToFile(fp, images, duration, loops, xy, dispose)
File "/Users/Craig/Documents/github/RTB/images2gif.py", line 435, in writeGifToFile
fp.write(header.encode('utf-8'))
images2gif लाइन 435: fp.write(header.encode('utf-8'))
अपडेट किया गया ट्रैस बैक:
Traceback (most recent call last):
File "gif.py", line 16, in <module>
writeGif("test.gif", frames, duration=FRAME_DELAY, dither=0)
File "/Users/Craig/Documents/github/RTB/images2gif.py", line 579, in writeGif
gifWriter.writeGifToFile(fp, images, duration, loops, xy, dispose)
File "/Users/Craig/Documents/github/RTB/images2gif.py", line 440, in writeGifToFile
fp.write(globalPalette)
TypeError: must be string or buffer, not None
कौन सा अजगर संस्करण आप पर कर रहे हैं? – aIKid
छवियों का कौन सा संस्करण आप उपयोग कर रहे हैं? मैं पिछले संस्करण – PasteBT
में उस रेखा को नहीं देख सकता हूं इस संस्करण में कोई एन्कोड नहीं है और मुझे अधिक उचित लगता है https://github.com/luopio/bag-of-tricks/blob/master/python/images2gif.py; अनुमान नहीं लगा सकता कि कोई स्ट्रिंग एन्कोड क्यों कर सकता है; image2gif का कोड py3 अनुकूल नहीं दिखता है, इसलिए मुझे लगता है कि यह py2 – alko