k4yt3x / video2x

A machine learning-based lossless video super resolution framework. Est. Hack the Valley II, 2018.
https://video2x.org
GNU Affero General Public License v3.0
10.77k stars 1.01k forks source link

AttributeError: 'NoneType' object has no attribute 'split' #625

Closed andykais closed 2 years ago

andykais commented 2 years ago

Hi, I am getting an error with the following command. Is it possible flv is not supported? The error message isn't terribly intuitive so its hard to tell.

video2x -i Zatch\ Bell\ Episode\ 001\ English\ Dubbed.flv -o Zatch\ Bell\ Episode\ 001\ English\ Dubbed.video2x.mp4

    __      __  _       _                  ___   __   __
    \ \    / / (_)     | |                |__ \  \ \ / /
     \ \  / /   _    __| |   ___    ___      ) |  \ V /
      \ \/ /   | |  / _` |  / _ \  / _ \    / /    > <
       \  /    | | | (_| | |  __/ | (_) |  / /_   / . \
        \/     |_|  \__,_|  \___|  \___/  |____| /_/ \_\

                  Video2X Video Enlarger

                       Version 4.3.1

[+] INFO: Loading files into processing queue
2022-03-30 23:12:23.312385 [+] INFO: Input path(s): Zatch Bell Episode 001 English Dubbed.flv
[!] ERROR: An exception has occurred
Traceback (most recent call last):
  File "/usr/bin/video2x", line 342, in <module>
    upscaler.run()
  File "/usr/share/video2x/upscaler.py", line 571, in run
    input_file_type = input_file_mime_type.split("/")[0]
AttributeError: 'NoneType' object has no attribute 'split'
[!] ERROR: The error log file can be found at: /tmp/video2x_sbvbdvka.log
k4yt3x commented 2 years ago

I think this may be a bug that was later fixed in a nightly version as a test, but the fix never got into the master branch for a reason I've forgotten. I see that you're already running v2x on Linux/WSL? Maybe try 5.0.0 which contains way less bugs.

k4yt3x commented 2 years ago

I haven't written an instruction for how to manually install the new 5.0.0 as a Python package yet, because I want to wait until it's on PyPI (out of beta) before I do that. It's simple though:

git clone https://github.com/k4yt3x/video2x.git
cd video2x
pip install .

Then you should be able to use the video2x command. I haven't tested direct invocation yet. If that doesn't work, python -m video2x should.