Skip to content
This repository was archived by the owner on Oct 21, 2022. It is now read-only.
This repository was archived by the owner on Oct 21, 2022. It is now read-only.

Invalid utf characters in linux #10

Open

Description

@csoriano1618

This is the error when trying to execute a file in Linux that has been made in Linux.
Traceback (most recent call last):
File "/opt/LightTable/plugins/python/py-src/ltmain.py", line 191, in handleEval
code= compile(code, data[2]["name"], 'exec')
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-12: ordinal not in range(128)
screenshot from 2014-02-01 02 46 57

Activity

  1. flashus commented on Jul 14, 2014

    @flashus

    I have exactly same issue in Windows7. Folder where the file opened is contains python files with unicode characters. All files were made in windows. I cant see this bug when I open file and trying to evaluate it (just nothing works), but if I add python connection to the folder with my project and then try to evaluate my file (without unicode characters in itself, only in other files in folder) I am getting exactly same error.

  2. SuperElectric commented on Jan 14, 2015

    @SuperElectric

    Same problem here; working on Ubuntu 14.04, fresh install of latest LightTable as of 14 Jan 2015 (LightTable version 0.7.2, binary version 0.8.6).

  3. nathanielng commented on Mar 16, 2015

    @nathanielng

    I have the same problem here, but I have something that seems to be a workaround. Adding one of the following the the first or second line of the Python code (depending on the encoding used) seems to work for me:

    # -*- coding: ascii -*-
    

    OR

    # -*- coding: utf-8 -*-
    

    Based on: https://www.python.org/dev/peps/pep-0263/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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