Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Installation error with python 3.4.0 #155

@ghost

Description

byte-compiling build/bdist.linux-x86_64/egg/twitter/_file_cache.py to _file_cache.cpython-34.pyc
  File "build/bdist.linux-x86_64/egg/twitter/_file_cache.py", line 65
    except (AttributeError, IOError, OSError), e:
                                             ^
SyntaxError: invalid syntax

byte-compiling build/bdist.linux-x86_64/egg/twitter/api.py to api.cpython-34.pyc
  File "build/bdist.linux-x86_64/egg/twitter/api.py", line 770
    print 'request_url', request_url, parameters
                      ^
SyntaxError: invalid syntax

byte-compiling build/bdist.linux-x86_64/egg/twitter/__init__.py to __init__.cpython-34.pyc
  File "build/bdist.linux-x86_64/egg/twitter/__init__.py", line 36
    raise ImportError, "Unable to load a json library"
                     ^
SyntaxError: invalid syntax

byte-compiling build/bdist.linux-x86_64/egg/twitter/list.py to list.cpython-34.pyc

for the first error we should have

    except (AttributeError, IOError, OSError) as e:

this instruction is not python 2.5 compatible ( http://stackoverflow.com/questions/2535760/python-try-except-comma-vs-as-in-except )

for the seconde we should have

    print ('request_url', request_url, parameters)

to keep compatibility with python < 3 you could use

from __future__ import (print_function)

for the last it should be

    raise ImportError("Unable to load a json library")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions