Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NameError: name 'convert_some_words_to_disturbing_unicode_text' is not defined #4

Open
shadee22 opened this issue Apr 13, 2023 · 2 comments

Comments

@shadee22
Copy link

NameError: name 'convert_some_words_to_disturbing_unicode_text' is not defined
i set env files as you told :

this is the code :
from cataclysm import consume
consume(globals())
s = "May the gods have mercy on us all"
corrupted = convert_some_words_to_disturbing_unicode_text(s, "mercy on us")
print_surrounded_by_ascii_art_of_an_old_scroll(corrupted, use_wcwidth_for_padding=True)

@Mattie
Copy link
Owner

Mattie commented Apr 13, 2023

Hi @shadee22 -- consume() itself only works properly in the interpreter or a notebook. Python globals can't easily be consumed otherwise, or I haven't found a clever way yet!

If this is from within a module or script, it might not work as well. You'd want to use doom instead like this:

from cataclysm import doom
s = "May the gods have mercy on us all"
corrupted = doom.convert_some_words_to_disturbing_unicode_text(s, "mercy on us")
print(corrupted)

@Mattie
Copy link
Owner

Mattie commented Apr 16, 2023

Let me know if you need anymore help on this one, @shadee22!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants