py3k RC-1: "LookupError: unknown encoding: uft-8"

I just installed the first release candidate of Python 3.0 and got this error after typing:

>>> help('modules foo')
[...]
LookupError: unknown encoding: uft-8

Notice that it says uft-8 and not utf-8

Is this a py3k specific bug or a misconfiguration on my part? I do not have any other versions of Python installed on this French locale Windows XP SP3 machine.

Edit

A bug has been filled by Alex Coventry on October 16th.


Asked by: Kelsey411 | Posted: 28-01-2022






Answer 1

It's not a typo, it's a deliberate error in a test module.

met% pwd
/home/coventry/src/Python-3.0rc1
met% rgrep uft-8 .
./Lib/test/bad_coding.py:# -*- coding: uft-8 -*-
./py3k/Lib/test/bad_coding.py:# -*- coding: uft-8 -*-

Removing this module causes the help command to fall over in a different way.

It is a bug, however. Someone should file a report.

Answered by: Catherine131 | Posted: 01-03-2022



Answer 2

Looks like a typo in a config file somewhere, whether in the Py3k package or on your machine. You might try installing the stable final Python 2.6 (which supports 3.0 syntax changes with imports from __future__), and if that works you should probably file a bug report.

Answered by: Robert661 | Posted: 01-03-2022



Similar questions

pip - Python LookupError: unknown encoding: cp20936

When I run scripts, it's fine, but when I try to install modules (ie. pip install python-dateutil) it would complain about: LookupError: unknown encoding: cp20936 Also, when I run python command line, I get this error from every command (including chcp). I tried reinstalling, same problem. How do I fix this?


Python 2.7 : LookupError: unknown encoding: cp65001

This question already has answers here:


python - LookupError: unknown encoding: utf8r

when I try the code: f = open("xronia.txt", "r") for x in f: print(x) I always take this Error:Traceback (most recent call last): File "C:\Users\Desktop\PYTHON\Προγραμματισμός Σταύρος\disekta.py", line 2, in lines=fo.readlines() File "C:\Users\AppData\Local\Programs\Python\Python38-32\lib\encodings\cp1253.py", line 23, in...


mingw - Python LookupError: unknown encoding: cp65001

This question already has an answer here: Python 2.7 : LookupError: unknown encoding: cp65001 but my case is slightly different. I'm using msys (mingw64) terminal to build a project; I have two versions of python 3.8 and 2.7. After setting: set PYTHONIOENCODING=UTF-8 as su...


api - Python: LookupError: unknown encoding: hex

I'm using a Twitter API called Tweepy. It has been working fine, then I rebooted the server and now I'm getting this: >>> import tweepy Traceback (most recent call last): File "<stdin>", line 1, in <module> File "tweepy/__init__.py", line 17, in <module> from tweepy.streaming import Stream, StreamListener File "tweepy/streaming.py", line 16, in <module> json = ...


python - "LookupError: unknown encoding: ascii" when running bootstrap

I'm using zc.buildout, and when I try to run bootstrap (for the first time on a new computer), I'm receiving the following error below: >> python2.7 bootstrap.py Traceback (most recent call last): File "bootstrap.py", line 158, in <module> import pkg_resources File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/../../Extras/lib/python/pkg_resources.py", line 698...


pip - Python LookupError: unknown encoding: cp20936

When I run scripts, it's fine, but when I try to install modules (ie. pip install python-dateutil) it would complain about: LookupError: unknown encoding: cp20936 Also, when I run python command line, I get this error from every command (including chcp). I tried reinstalling, same problem. How do I fix this?


Python 2.7 : LookupError: unknown encoding: cp65001

This question already has answers here:


Python: LookupError: unknown encoding: cp0

I am trying to execute a simple nltk code: nltk.sent_tokenize(text) and am getting error LookupError: unknown encoding: cp0. I tried typing in chcp in my IPython Console and I am getting the same error. I am working on Windows10 desktop, executing Python code over Miniconda > Spyder IDE. I have Python 2.7 installed.


LookupError: unknown encoding: idna error with Selenium and Python

I was trying to get into introductory web scraping with selenium in Python, but I keep getting this mysterious error when I start up a basic Chrome instance: LookupError: unknown encoding: idna when using the following code: from selenium import webdriver url = 'http://www.webscrapingfordatascience.com/complexjavascript/' driver = webdriver.Chrome() driver.ge...


python - LookupError: unknown encoding: utf8r

when I try the code: f = open("xronia.txt", "r") for x in f: print(x) I always take this Error:Traceback (most recent call last): File "C:\Users\Desktop\PYTHON\Προγραμματισμός Σταύρος\disekta.py", line 2, in lines=fo.readlines() File "C:\Users\AppData\Local\Programs\Python\Python38-32\lib\encodings\cp1253.py", line 23, in...


mingw - Python LookupError: unknown encoding: cp65001

This question already has an answer here: Python 2.7 : LookupError: unknown encoding: cp65001 but my case is slightly different. I'm using msys (mingw64) terminal to build a project; I have two versions of python 3.8 and 2.7. After setting: set PYTHONIOENCODING=UTF-8 as su...


api - Python: LookupError: unknown encoding: hex

I'm using a Twitter API called Tweepy. It has been working fine, then I rebooted the server and now I'm getting this: >>> import tweepy Traceback (most recent call last): File "<stdin>", line 1, in <module> File "tweepy/__init__.py", line 17, in <module> from tweepy.streaming import Stream, StreamListener File "tweepy/streaming.py", line 16, in <module> json = ...


python - "LookupError: unknown encoding: ascii" when running bootstrap

I'm using zc.buildout, and when I try to run bootstrap (for the first time on a new computer), I'm receiving the following error below: >> python2.7 bootstrap.py Traceback (most recent call last): File "bootstrap.py", line 158, in <module> import pkg_resources File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/../../Extras/lib/python/pkg_resources.py", line 698...


c - LookupError: unknown encoding 'big5' under embeded python

I am building a R extension which has an embedded python in it. Everything goes well now, except that the python cannot find the encoding I needed. It keeps throwing LookupError when I do something involving 'big5'. However, if I build a stand alone c++ application, the python interpreter does find the encoding and stop throwing errors. test.cpp for normal stand alone example in c:


pip - Python LookupError: unknown encoding: cp20936

When I run scripts, it's fine, but when I try to install modules (ie. pip install python-dateutil) it would complain about: LookupError: unknown encoding: cp20936 Also, when I run python command line, I get this error from every command (including chcp). I tried reinstalling, same problem. How do I fix this?


python - Why does cqlsh fail with LookupError: unknown encoding?

I've just installed Cassandra using brew on Mac OS X 10.9.4: ➜ ~ brew info cassandra cassandra: stable 2.1.0 http://cassandra.apache.org /usr/local/Cellar/cassandra/2.0.9 (3466 files, 79M) * Built from source From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/cassandra.rb ==> Caveats If you plan to use the CQL shell (cqlsh), you will need the Python CQL library instal...


python - LookupError: from nltk.book import*

In iPython console I typed from nltk.book import and I got several LookupErrors. Below shows the code I got. *** Introductory Examples for the NLTK Book *** Loading text1, ..., text9 and sent1, ..., sent9 Type the name of the text or sentence to view it. Type: 'texts()' or 'sents()' to list the materials. --------------------------------------------------------------------------- LookupError T...


Python 2.7 : LookupError: unknown encoding: cp65001

This question already has answers here:


python - django migrations "LookupError: No installed app . . ." for initial data migrations

I want to provide initial data for user profile using migration. But somehow the app that I used to extend User models failed at lookup. The UserProfile class model is related one to one with auth.User & related One to many with class model from other app. Anyone have any idea to solved my problem? python version: 2.7 django version: 1.8.11 Here's the traceback when doing testing:


python - ZEEP WSDL LookupError: No type 'string' in namespace

I'm trying to use ZEEP v1.2.0 to connect to some service and ran into this issue. I just execute: python -mzeep http://fulfill.sfcservice.com/default/svc/wsdl Result: zeep.exceptions.LookupError: No type 'string' in namespace http://www.chinafulfill.com/CffSvc/. Available types are: [...] Am I missing anything here to test this?


python - how to fix LookupError: base64 in python3 while running String decode() Method

I am running below program in python3, but getting an error Str = "this is string example....wow!!!"; Str = Str.encode('base64','strict'); print ("Encoded String: " + Str) print ("Decoded String: " + Str.decode('base64','strict')) and getting Error is:- File "learn.py", line 646, in <module> Str = Str.encode('base64','strict'); LookupError: 'base64' is not a text...






Still can't find your answer? Check out these communities...



PySlackers | Full Stack Python | NHS Python | Pythonist Cafe | Hacker Earth | Discord Python



top