tumblr / pytumblr

A Python Tumblr API v2 Client
Apache License 2.0
723 stars 196 forks source link

500 Internal Server Error at /login when running locally #81

Closed evvvritt closed 7 years ago

evvvritt commented 8 years ago

Hi, I'm trying to run this locally so I can import as photo post types.

I managed to start the server and load the landing page but clicking 'Connect to Tumblr' gives me an internal server error. Please help :$


p.s. I'm not familiar with Python and I couldn't get the server to start using a config file, getting the following error:

$ WP2TUMBLR_SETTINGS=settings.py; python wp2tumblr.py
Traceback (most recent call last):
  File "wp2tumblr.py", line 24, in <module>
    app.config.from_envvar('WP2TUMBLR_SETTINGS')
  File "/Library/Python/2.7/site-packages/flask/config.py", line 107, in from_envvar
    variable_name)
RuntimeError: The environment variable 'WP2TUMBLR_SETTINGS' is not set and as such configuration could not be loaded.  Set this variable and make it point to a configuration file

Your instructions list settings.py but the sample is saved as settings.cfg, I tried saving both (in same folder as wp2tumblr.py and in /settings/settings.py) but nothing worked.

So I tried hardcoding the settings into the wp2tumblr.py file, which got it to run but maybe that's causing a 500 error?

app.config['TUMBLR_CONSUMER_KEY'] = '####'  
app.config['TUMBLR_CONSUMER_SECRET'] = '####'  
app.debug = False  
app.config['DEBUG'] = False  
app.config['SECRET_KEY'] = 'development'  
app.config['LOG_FILE'] = '/log/log_file.log'  
jasonpenny commented 7 years ago

Sorry, those files are not part of pytumblr; they appear to be part of https://github.com/jonthornton/wp2tumblr so you should file an issue there is you're still having this problem