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

backport.py causes errors when installing in Python 2.x #77

Closed
john2x opened this issue Mar 24, 2012 · 9 comments
Closed

backport.py causes errors when installing in Python 2.x #77

john2x opened this issue Mar 24, 2012 · 9 comments

Comments

@john2x
Copy link
Contributor

john2x commented Mar 24, 2012

Python 2.x doesn't have the six module, setup.py fails.

@bboe
Copy link
Member

bboe commented Mar 24, 2012

Are you sure this is still happening? I fixed this on my dev repo (https://github.com/bboe/reddit_api) earlier. Did you run setup from the git repo or pip install? If the former, then I can see why you had the problem since I haven't checked in the "hack" solution to the primary repository.

@john2x
Copy link
Contributor Author

john2x commented Mar 24, 2012

Yeah installed from the git repo. I used pip, but I used the git repo in my requirements.txt file. The tarball should work fine?

EDIT: Just tried the 1.3.0 tarball, but still get the same error. I'll try the older versions later.

@bboe
Copy link
Member

bboe commented Mar 24, 2012

@john2x
Copy link
Contributor Author

john2x commented Mar 25, 2012

Thanks. I've already installed the 1.2 version on my server, I'll update it later.

I'm having some problems on my production app though. It seems getting a response from the API takes > 2 minutes. I'm using WebFaction as host. Is there a configuration I can change to address this? (I also got the delay while developing on an Ubuntu VM, but it's snappy when I'm testing in Mac OS X)

Sorry for going off topic. I'm not sure where I can ask this, as I don't think it's necessarily an issue. The app is at http://coderedd.net (it's basically r.doqdoq.com but running on Django and using the latest reddit_api).

@john2x
Copy link
Contributor Author

john2x commented Mar 26, 2012

Just tried (both on my Mac and on the server) the tarball you provided. I get the following error:

TypeError: unsupported operand type(s) for +: 'HackObj' and 'str'

(full stack trace)

@bboe
Copy link
Member

bboe commented Mar 26, 2012

@john2x Are you trying to create an egg? That is not something I've tried. Can you give me the command you are using with setup.py? As far as your delays with WebFaction, I'm not sure what to tell you. It could just be Reddit-side issues.

@john2x
Copy link
Contributor Author

john2x commented Mar 27, 2012

On my server, I typed PYTHONPATH=$HOME/webapps/app_name/lib/python2.7 python2.7 setup.py install --install-lib=$HOME/webapps/app_name/lib/python2.7/ --install-scripts=$HOME/webapps/app_name/bin/. It's for installing in a specific app directory, kind of like in a virtual environment. (WebFaction's instructions)

As for my Mac, I just ran python setup.py install, but I'm installing it in a virtualenv.

Request: Can you put the default contents of reedit_api.cfg in the wiki? I've been trying to find it, but I can't find it in the library's install directory. Maybe my issue with WebFaction can be addressed by api_request_delay setting, but I don't know the default value. :)

@bboe
Copy link
Member

bboe commented Mar 30, 2012

Follow the easy_install instructions rather than the setup.py instructions. Please confirm that it works that way.

Edit: The reddit_api.cfg default file can be found: https://github.com/mellort/reddit_api/blob/master/reddit/reddit_api.cfg

@bboe
Copy link
Member

bboe commented Apr 2, 2012

I removed the hackish solution and no longer import reddit in setup.py thus this should be no problem anymore. Closing the issue.

@bboe bboe closed this as completed Apr 2, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants