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

Command Togif didn't work, no return #208

Open Asuna-Yuuki69 opened 11 months ago

Asuna-Yuuki69 commented 11 months ago

Describe the bug

After using Togif command, it downloaded the video and "processed" after a while it thrown error with no output

Traceback

DATETIME:2023-09-08 08:47:55.423182
COMMAND:/togif {}
TRACEBACK:
Traceback (most recent call last):
  File "/root/.cache/pypoetry/virtualenvs/mediaforge-HXFskkj--py3.11/lib/python3.11/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 0x7f32759dbec0> 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.11/lib/python3.11/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.11/lib/python3.11/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 0x7f32759dbec0> returned nothing.

Expected Behavior

It will convert my mp4 video to a gif

Steps To Reproduce

Send mp4 video

Anything Else

:eemark: discord.app_commands.errors.CommandInvokeError: Hybrid command raised an error: Command 'togif' raised an exception: ReturnedNothing: Expected image, <function mp4togif at 0x7f32759dbec0> returned nothing.

reticivis-net commented 9 months ago

Does this always happen on a certian gif or is it random?

Asuna-Yuuki69 commented 9 months ago

Does this always happen on a certian gif or is it random?

Yuh, I just tried different vids and whenever it's supposed to convert it, it spits out the same error, the video was 15s long.

Asuna-Yuuki69 commented 9 months ago

Yet esmbot which I'm not sure is owned by you, is able to convert images to gif format easily. Mediaforge just has these problems with mp4 vids, also the :working: emoji is displayed as ":working:" instead of an actual emoji

reticivis-net commented 9 months ago

Yet esmbot which I'm not sure is owned by you, is able to convert images to gif format easily.

Esmbot is not owned by me and uses a completely different internal system

also the :working: emoji is displayed as ":working:" instead of an actual emoji

Probably beccause it doesn't have external emoji perms in the server it's in. i should implement something to detect that

reticivis-net commented 9 months ago

Can you send me one of the videos? I'm unable to reproduce the error.

Asuna-Yuuki69 commented 9 months ago

Can you send me one of the videos? I'm unable to reproduce the error.

Sure, just be aware that they may seem pretty unusual at least

vid1

vid2

These two were used to make them into a gif