Skip to content

sqlite3.ProgrammingError with non-english attachments #243

@item4

Description

@item4

Python version: 2.7.11
Lektor version: master branch

Let's make simple and same situation

  1. $ lektor quickstart and $ cd to project dir. (in this example, project name is test. other fields must type enter to skip with yes)
  2. $ touch content/blog/first-post/미츠히코.txt (미츠히코 is Korean alphabet of mitsuhiko)
  3. $ lektor server

Traceback

(lektor) [item4@item4-mbp test]$ lektor server
 * Project path: /Users/item4/Projects/lektor/test/test.lektorproject
 * Output path: /Users/item4/Library/Caches/Lektor/builds/1d660b474e4a3c0330f4ce35b4827072
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
Started source info update
Finished source info update in 0.23 sec
Started build
U index.html
U about/index.html
U projects/index.html
U blog/index.html
U static/style.css
U blog/first-post/index.html
U blog/first-post/미츠히코.txt
Finished build in 0.07 sec
Started prune
Finished prune in 0.00 sec
Traceback (most recent call last):
  File "/Users/item4/Projects/lektor/lektor/devserver.py", line 49, in build
    builder.prune()
  File "/Users/item4/Projects/lektor/lektor/builder.py", line 1062, in prune
    for aft in build_state.iter_unreferenced_artifacts(all=all):
  File "/Users/item4/Projects/lektor/lektor/builder.py", line 371, in iter_unreferenced_artifacts
    and is_primary_source''', [artifact_name])
ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions