cloudpipe / cloudpipe/cloudpickle

TypeError: an integer is required (got type bytes)

Open
#404 7 comments 14 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.9k
Forks
195
Avg merge
1d 10h
Merged PRs (30d)
1

Description

Since upgrading to python 3.8 I can't access pickle files created with python 3.7.
This originated from [this issue](https://github.com/facebookincubator/submitit/issues/39) and might be related to [this one](https://github.com/cloudpipe/cloudpickle/issues/266).

## Repro
In python 3.7 (cloudpickle==1.6.0):
```
import cloudpickle

def foo():
pass

with open("foo.pkl", "wb") as ofile:
cloudpickle.dump(foo, ofile)
```

In python 3.8 (cloudpickle==1.6.0):
```
import cloudpickle

with open("foo.pkl", "rb") as ifile:
print(cloudpickle.load(ifile))
```
Throws
```
Traceback (most recent call last):
File "", line 2, in
TypeError: an integer is required (got type bytes)
```
---
Is there any way to migrate those pickle files to use them with python 3.8?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.