Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import zodbpickle.pickle UnicodeDecodeError #20

Closed
aidiss opened this issue Jul 15, 2016 · 4 comments
Closed

import zodbpickle.pickle UnicodeDecodeError #20

aidiss opened this issue Jul 15, 2016 · 4 comments

Comments

@aidiss
Copy link

aidiss commented Jul 15, 2016

---------------------------------------------------------------------------
UnicodeDecodeError                        Traceback (most recent call last)
<ipython-input-33-82dc2cbee6e8> in <module>()
----> 1 import zodbpickle.pickle

C:\Users\user\Miniconda3\lib\site-packages\zodbpickle\pickle.py in <module>()
      2 
      3 if sys.version_info[0] >= 3:
----> 4     from .pickle_3 import *
      5 else:
      6     from .pickle_2 import *

C:\Users\user\Miniconda3\lib\site-packages\zodbpickle\pickle_3.py in <module>()
   1481 # Use the faster _pickle if possible
   1482 try:
-> 1483     from zodbpickle._pickle import *
   1484 except ImportError:
   1485     Pickler, Unpickler = _Pickler, _Unpickler

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 4: invalid start byte
@jamadden
Copy link
Member

jamadden commented Jul 15, 2016

What are the details about your Python installation (exact version, platform tag)?

How did you install zodbpickle? via pip? Did it compile from source or choose the egg or exe installer?

If you're not sure, try creating a new virtual environment and running its pip install -v zodbpickle. If that still fails, try (after uninstalling zodbpickle, or in a new venv) pip install -v --no-binary :all: zodbpickle. The logs from those cases could be useful.

@aidiss
Copy link
Author

aidiss commented Jul 15, 2016

Python 3.4.4 |Anaconda 2.1.0 (64-bit)| (default, Feb 16 2016, 09:54:04) [MSC v.1
600 64 bit (AMD64)] on win32

I installed ZODB by pip install zodb
I will try creating a new virtual environment later and get bet with more details

@jamadden
Copy link
Member

Are there any updates on this?

@tseaver
Copy link
Member

tseaver commented Jun 18, 2024

I cannot see any way for the import of zodbpickle._pickle to raise a UnicodeDecdeError, unless somehow the C files were transcoded to a non-UTF8 encoding during save?

The module initialization doesn't touch anything Unicode related: it initializes its types and exceptions, and sets them into its dictionary using ASCII names.

@aidiss Please reopen if you can supply any further information.

@tseaver tseaver closed this as completed Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants