reticivis-net / mediaforge

A Discord bot for editing and creating videos, images, GIFs, and more!
GNU General Public License v3.0
81 stars 28 forks source link

togif: ReturnedNothing error #225

Open movieslol opened 7 months ago

movieslol commented 7 months ago

Describe the bug

I can't use the /togif command due to it giving an error every time. The video is only under 15 seconds.

Traceback

DATETIME:2024-01-05 23:40:50.220383
COMMAND:/togif {}
TRACEBACK:
Traceback (most recent call last):
  File "/root/.cache/pypoetry/virtualenvs/mediaforge-HXFskkj--py3.12/lib/python3.12/site-packages/discord/app_commands/commands.py", line 827, in _do_call
    return await self._callback(self.binding, interaction, **params)  # type: ignore
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mediaforge/src/commands/conversion.py", line 146, in togif
    await process(ctx, processing.ffmpeg.mp4togif, [["VIDEO"]])
  File "/mediaforge/src/core/process.py", line 151, in process
    raise e
  File "/mediaforge/src/core/process.py", line 125, in process
    raise processing.common.ReturnedNothing(f"Expected image, {func} returned nothing.")
processing.common.ReturnedNothing: Expected image, <function mp4togif at 0x7f51ce40b4c0> returned nothing.

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

Traceback (most recent call last):
  File "/root/.cache/pypoetry/virtualenvs/mediaforge-HXFskkj--py3.12/lib/python3.12/site-packages/discord/ext/commands/hybrid.py", line 438, in _invoke_with_namespace
    value = await self._do_call(ctx, ctx.kwargs)  # type: ignore
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.cache/pypoetry/virtualenvs/mediaforge-HXFskkj--py3.12/lib/python3.12/site-packages/discord/app_commands/commands.py", line 846, in _do_call
    raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'togif' raised an exception: ReturnedNothing: Expected image, <function mp4togif at 0x7f51ce40b4c0> returned nothing.

Expected Behavior

The command is supposed to convert the video (mp4, mov) into a gif.

Steps To Reproduce

  1. Send video
  2. Use command
  3. Receive error

Anything Else

No response

reticivis-net commented 7 months ago

Can you send the video in question?

movieslol commented 7 months ago

https://cdn.discordapp.com/attachments/766066173376725029/1192975553771360356/6HE9p8_nyyz-oxuh.mov?ex=65ab0810&is=65989310&hm=18926afd7885471d3695c5b6c224b5e072c3dfc3ddf1a17834807c79f87bf2e3&

3boodhly commented 7 months ago

انا زهقت من الحوار دا صلحوه بقا يخربيت كدا

reticivis-net commented 7 months ago

You need to upload the “traceback.txt” file the bot attached or I cannot fix the issue because I don’t know what went wrong

3boodhly commented 6 months ago

I already did that.