3b1b / videos

Code for the manim-generated scenes used in 3blue1brown videos
5.81k stars 1.55k forks source link

keyError : 'data' from wordle.py #18

Closed umaruta4 closed 2 years ago

umaruta4 commented 2 years ago

DATA_DIR = os.path.join(get_directories()["data"], "wordle") KeyError: 'data'

after checking what get_directories() returns, I can't seem to find any key named data

so what is inside this 'data' ?

umaruta4 commented 2 years ago

just so anyone wondering how to get the get_directories() function is by :

from manimlib.utils.directories import get_directories

arun279 commented 2 years ago

I'm having the same issue. can't seem to find this data directory.

TonyCrane commented 2 years ago

It is a setting in the yml file

Nata-4681 commented 2 years ago

Can anyone help with this?


C:\Users\Name\AppData\Local\Programs\Python\Python38\lib\site-packages\pydub\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning) Traceback (most recent call last): File "C:/Users/Name/Desktop/videos-master/videos-master/_2022/wordle.py", line 10, in DATA_DIR = os.path.join(get_directories()["data"], "wordle") KeyError: 'data Screenshot 2022-02-07 213005 '

Futuremappermydud commented 2 years ago

Set the path in custom_config.yml and drag it into the folder

Nata-4681 commented 2 years ago

Set the path to the "wordle_data" folder in directories "temporary_storage" ? Screenshot 2022-02-07 221505

Futuremappermydud commented 2 years ago

directories: mirror_module_path: True output: "/Users/grant/Dropbox/3Blue1Brown/videos" raster_images: "/Users/grant/Dropbox/3Blue1Brown/images/raster" vector_images: "/Users/grant/Dropbox/3Blue1Brown/images/vector" pi_creature_images: "/Users/grant/Dropbox/3Blue1Brown/images/pi_creature/svg" sounds: "/Users/grant/Dropbox/3Blue1Brown/sounds" data: "/data" temporary_storage: "/Users/grant/Dropbox/3Blue1Brown/manim_cache" universal_import_line: "from manim_imports_ext import *"

Futuremappermydud commented 2 years ago

image

Nata-4681 commented 2 years ago

Thanks, seems to have solved the issue. Only problem is manim imports remain unresolved and now pattern_matrix.npy cannot be retrieved. Screenshot 2022-02-07 222710 Screenshot 2022-02-07 222944

sriharshamadala commented 2 years ago

@Nata-4681, if you edit the custom_config.yml to change the 'data' field like "./data" make sure to create a local dir data and a subdir wordle inside it.

Frontgecko commented 2 years ago

@Nata-4681, if you edit the custom_config.yml to change the 'data' field like "./data" make sure to create a local dir data and a subdir wordle inside it.

I followed the comments in this thread and have the same issue. Created the local data directory with the subdirectory of wordle. When running the python script, it spits out the NPY file but I see no other graphics. When trying to run the python script via command line, I have the same error: DATA_DIR = os.path.join(get_directories()["data"], "wordle") KeyError: 'data'

image
Frontgecko commented 2 years ago

@Nata-4681, if you edit the custom_config.yml to change the 'data' field like "./data" make sure to create a local dir data and a subdir wordle inside it.

I followed the comments in this thread and have the same issue. Created the local data directory with the subdirectory of wordle. When running the python script, it spits out the NPY file but I see no other graphics. When trying to run the python script via command line, I have the same error: DATA_DIR = os.path.join(get_directories()["data"], "wordle") KeyError: 'data' image

Nevermind I figured it out, was attempting to run the wordle.py from the wrong subdirectory. After running it out from manim folder, it ran perfectly. Thank you.

Nata-4681 commented 2 years ago

I realized I am actually missing the file itself.. and I cannot find it in the GitHub folder either? Where does one find pattern_matrix.npy? Forgive me if I am missing it but for some reason it is not there?

Screenshot 2022-02-08 220116

cornflakesdev commented 2 years ago

I realized I am actually missing the file itself.. and I cannot find it in the GitHub folder either? Where does one find pattern_matrix.npy? Forgive me if I am missing it but for some reason it is not there?

Screenshot 2022-02-08 220116

It is generated, along with the other files not found in the folder, upon the first iteration