Top "Python-2to3" questions

2to3 is a tool for automated Python 2 to 3 code translation.

Unpickling a python 2 object with python 3

I'm wondering if there is a way to load an object that was pickled in Python 2.4, with Python 3.4. I've been …

python python-3.x pickle python-2.4 python-2to3
TypeError: a bytes-like object is required, not 'str' - python 2 to 3

Hi I am having trouble with this error message. I am new to Python and this Python2 and Python3 is …

python typeerror python-2to3
How to use 2to3 properly for python?

I have some code in python 2.7 and I want to convert it all into python 3.3 code. I know 2to3 can …

python python-2.7 python-3.3 python-2to3
Why does Python 3 need dict.items to be wrapped with list()?

I'm using Python 3. I've just installed a Python IDE and I am curious about the following code warning: features = { ... } for …

python python-3.x python-2to3
How to use/install python 2to3?

From this https://docs.python.org/3.4/library/2to3.html it says that 2to3 should be installed as a script alongside …

python python-2to3
How to use 2to3 tool in windows?

I tried to modify the sintax using 2to3 tool by running command python C:\Python32\Tools\scripts\2to3.py neo4…

python python-2to3
AttributeError:'bytes' object has no attribute 'encode'

Trying to import a code from python2 to python 3 and this problem happens <ipython-input-53-e9f33b00348a> …

python python-2to3
Attempted relative import in non-package (after 2to3)

After converting to Python 3.x using 2to3 (see my previous question), I get this error during the build: File "setup.…

python python-3.x python-2to3
Sorting list by an attribute that can be None

I'm trying to sort a list of objects using my_list.sort(key=operator.attrgetter(attr_name)) but if any …

python python-3.x python-2to3
AttributeError: 'DiGraph' object has no attribute '_node'

The code is written by someone else using Python 2.7.12, networkx 1.11, numpy 1.13.0, scipy 0.18.1, matplotlib 2.0.2. It consists of several self-made modules. I …

python networkx spyder python-2to3