NexInfinite / videotoascii

A python generator that converts youtube videos to ascii art in your console.
https://julians.work/
28 stars 4 forks source link

Not working in Python 3.10 #2

Closed Nekoraru22 closed 2 years ago

Nekoraru22 commented 2 years ago

I had to change the regex import to re to avoid problems but now PyInquirer don't let me execute the ascii.py. I read tha's because the last version of python 3.10.

The error:

Traceback (most recent call last):
  File "/home/neko/Escritorio/videotoascii/ascii.py", line 8, in <module>
    from PyInquirer import prompt, Validator, ValidationError
ModuleNotFoundError: No module named 'PyInquirer'

image

NexInfinite commented 2 years ago

Hey! Thanks for reaching out, please try install PyInquirer by the command:

pip3 install PyInquirer

Let me know if that helps out.

Nekoraru22 commented 2 years ago

I alredy tried, but is the same

NexInfinite commented 2 years ago

Sorry to hear that, could you please send the output of the command python --version and python3 --version

Also can you please try to do the command python3 video_render.py <url>, this should bypass the cli and just run the video render script.

NexInfinite commented 2 years ago

Also another thought, try run the script without sudo. If you run it in sudo it may be running python as sudo and so you'll need to install pip packages via sudo pip3 install <package>.

NexInfinite commented 2 years ago

One more note, if you are still having issues and want to run this in python 3.8 you can set up a venv. When creating this project I used a venv of python3.8 and this is what it has been tested in. To do this follow the instructions below.

Instructions

Create the venv

cd your/project/path sudo apt install python3.8 or sudo pacman -S python3.8 or any other way of installing python3.8 on your system python3.8 -m venv venv

Load into venv

source venv/bin/activate

Run scripts

python main.py

Nekoraru22 commented 2 years ago

Python version:

image


The first command works for me:

image image

But I would have liked to see it as seen in the gif:

image


I have been doing it with 'sudo' because without it I had more errors:

image


I tried to install all the necessary packages and edit the code a little bit but to no avail. It is enough for me with the above command, thank you very much!

NexInfinite commented 2 years ago

Ah I see, well if you want the cli you should try use the venv but if you want it to be like the gif shown above set the flag--video_mode=true. This will make it look like above. Let me know if that helps.

(Also sweet setup)

Nekoraru22 commented 2 years ago

Just what i was looking for! I appreciate <3

Have a good day 😺