tiddly2md icon indicating copy to clipboard operation
tiddly2md copied to clipboard

name 'unicode' is not defined

Open sallirom opened this issue 6 years ago • 1 comments

Hi, I am not sure about this, but I get an error when running the script.

Could it be related to the python version (I am using python3)? It is strange that no one has commented this, so I guess I am doing something wrong.

This is what I get:

Traceback (most recent call last):
  File "tiddly2md.py", line 120, in <module>
    sys.exit(main(args))
  File "tiddly2md.py", line 94, in main
    filename = sanitize(row.title)
  File "tiddly2md.py", line 75, in sanitize
    value = unicode(value)
NameError: name 'unicode' is not defined

I would really appreciate some kind of clue, thank you very much.

sallirom avatar Jul 16 '18 17:07 sallirom

Thanks for the feedback. You're right, I'm pretty sure it's not working because you're using Python 3. unicode is not defined in Python 3, it's simply called str. So either you try replacing the calls to unicode with calls to str, or you run the script using Python 2. I hope that help.

achabotl avatar Jul 17 '18 13:07 achabotl