Giter Site home page Giter Site logo

Comments (5)

Pierce01 avatar Pierce01 commented on July 28, 2024

give this a shot. I havent tested it, but yeah

https://stackoverflow.com/questions/19230991/image-open-cannot-identify-image-file-python

from maybe-useful-cogs.

AznStevy avatar AznStevy commented on July 28, 2024

If you're on windows, it has to do with that, I think.

from maybe-useful-cogs.

GGrandma avatar GGrandma commented on July 28, 2024

Haven't tried what Pierce said yet but I am running my bot off a Raspberry Pi 3 with Python 3.

from maybe-useful-cogs.

GGrandma avatar GGrandma commented on July 28, 2024

Sorry for the long long long wait, this did not fix it. The error im getting now is.

Exception in command 'profile'
Traceback (most recent call last):
File "lib/discord/ext/commands/core.py", line 50, in wrapped
ret = yield from coro(*args, **kwargs)
File "/home/pi/Desktop/PeaterBot/cogs/leveler.py", line 107, in profile
await self.draw_profile(user, server)
File "/home/pi/Desktop/PeaterBot/cogs/leveler.py", line 1988, in draw_profile
bg_image = Image.open('data/leveler/temp/{}_temp_profile_bg.png'.format(user.id)).convert('RGBA')
File "lib/PIL/Image.py", line 875, in convert
self.load()
File "lib/PIL/ImageFile.py", line 255, in load
raise_ioerror(err_code)
File "lib/PIL/ImageFile.py", line 59, in raise_ioerror
raise IOError(message + " when reading image file")
OSError: broken data stream when reading image file

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "lib/discord/ext/commands/bot.py", line 846, in process_commands
yield from command.invoke(ctx)
File "lib/discord/ext/commands/core.py", line 374, in invoke
yield from injected(*ctx.args, **ctx.kwargs)
File "lib/discord/ext/commands/core.py", line 54, in wrapped
raise CommandInvokeError(e) from e
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: OSError: broken data stream when reading image file

^ broken when reading image D:

from maybe-useful-cogs.

vico93 avatar vico93 commented on July 28, 2024

I'm having similar issues.

May 13 22:52:15 HEFESTO python3.5[702]: [13/05/2018 22:52] ERROR red on_command_error 369: Exception in command 'rank'
May 13 22:52:15 HEFESTO python3.5[702]: Traceback (most recent call last):
May 13 22:52:15 HEFESTO python3.5[702]:   File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/core.py", line 50, in wrapped
May 13 22:52:15 HEFESTO python3.5[702]:     ret = yield from coro(*args, **kwargs)
May 13 22:52:15 HEFESTO python3.5[702]:   File "/mnt/usb0/.discord_bots/red/cogs/leveler.py", line 168, in rank
May 13 22:52:15 HEFESTO python3.5[702]:     await self.draw_rank(user, server)
May 13 22:52:15 HEFESTO python3.5[702]:   File "/mnt/usb0/.discord_bots/red/cogs/leveler.py", line 2584, in draw_rank
May 13 22:52:15 HEFESTO python3.5[702]:     profile_image = Image.open('data/leveler/temp/test_temp_rank_profile.png'.format(user.id)).convert('RGBA')
May 13 22:52:15 HEFESTO python3.5[702]:   File "lib/PIL/Image.py", line 2590, in open
May 13 22:52:15 HEFESTO python3.5[702]:     % (filename if filename else fp))
May 13 22:52:15 HEFESTO python3.5[702]: OSError: cannot identify image file 'data/leveler/temp/test_temp_rank_profile.png'
May 13 22:52:46 HEFESTO python3.5[702]: 19
May 13 22:53:39 HEFESTO python3.5[702]: 15
May 13 22:54:46 HEFESTO python3.5[702]: [13/05/2018 22:54] ERROR red on_command_error 369: Exception in command 'profile'
May 13 22:54:46 HEFESTO python3.5[702]: Traceback (most recent call last):
May 13 22:54:46 HEFESTO python3.5[702]:   File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/core.py", line 50, in wrapped
May 13 22:54:46 HEFESTO python3.5[702]:     ret = yield from coro(*args, **kwargs)
May 13 22:54:46 HEFESTO python3.5[702]:   File "/mnt/usb0/.discord_bots/red/cogs/leveler.py", line 103, in profile
May 13 22:54:46 HEFESTO python3.5[702]:     await self.draw_profile(user, server)
May 13 22:54:46 HEFESTO python3.5[702]:   File "/mnt/usb0/.discord_bots/red/cogs/leveler.py", line 2021, in draw_profile
May 13 22:54:46 HEFESTO python3.5[702]:     profile_image = Image.open('data/leveler/temp/{}_temp_profile_profile.png'.format(user.id)).convert('RGBA')
May 13 22:54:46 HEFESTO python3.5[702]:   File "lib/PIL/Image.py", line 2590, in open
May 13 22:54:46 HEFESTO python3.5[702]:     % (filename if filename else fp))
May 13 22:54:46 HEFESTO python3.5[702]: OSError: cannot identify image file 'data/leveler/temp/183671375695839233_temp_profile_profile.png'

And i'm also running red on a pi (3B)

from maybe-useful-cogs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.