question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

It doesn’t seem to work in Python 3. What a shame…

(env) 02:39:47 (master) /tmp/statik/examples/blog$ statik
Project path configured as: /tmp/statik/examples/blog
Error caught: name 'unicode' is not defined

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
gjcarneirocommented, Nov 20, 2016

I simply tried to build the example blog with Python 3.6 (also tried 3.5), and it doesn’t work:

(env) 06:09:26 (master) /tmp/statik$ pip install statik
Collecting statik
  Using cached statik-0.7.0.tar.gz
[...]
(env) 06:09:56 (master) /tmp/statik/examples/blog$ statik
Project path configured as: /tmp/statik/examples/blog
Error caught: name 'unicode' is not defined
(env) 06:09:57 (master) /tmp/statik/examples/blog$ python
Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) 
[GCC 6.2.0 20161005] on linux

Because of the name 'unicode' is not defined part I thought it was because the code wasn’t prepared to run in Python 3, because in Python 3 there is no unicode type, that only exists in Python 2.

As a side note, I don’t like the Error caught: name 'unicode' is not defined handling at all. You shouldn’t hide Python tracebacks, that is an anti-pattern: now I’m not even able to debug where this error comes from…

0reactions
thanethomsoncommented, Nov 21, 2016

No worries. I realised I didn’t actually have a requirements.txt in the repo for the blog example, so I just added it today. And apologies for the difficulty in debugging! Hope it’s easier from now on 😁

Read more comments on GitHub >

github_iconTop Results From Across the Web

Download Python
Download the latest Python 3 source. Read more. Alternative Implementations. This site hosts the "traditional" implementation of Python (nicknamed CPython). A ...
Read more >
Python 3.0 Release
Python 3.0 (a.k.a. "Python 3000" or "Py3k") is a new version of the language that is incompatible with the 2.x line of releases....
Read more >
Welcome to Python.org
The official home of the Python Programming Language. ... 3.10.9, 3.9.16, 3.8.16, 3.7.16, and 3.12.0 alpha 3 are now available; 2022-11-23 Where is...
Read more >
3.11.1 Documentation
Python Setup and Usage how to use Python on different platforms. Python HOWTOs in-depth documents on specific topics. Installing Python Modules
Read more >
Python Releases for Windows
The official home of the Python Programming Language.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found