Well, good news for me. I've got a bit further. I managed to get the
main page loading earlier but now it seems to have stopped loading and
gone back to the 500 error. Weirdly enough sometimes I get a plain 500
error page and sometimes I get the Pylons styled 500 error.

I must admit I don't really understand how the fcgi and pylons
interact being a bit of a noob at web development. Am I starting a new
process for each request, or does the fcgi or pylons process remain
running? There seems to be long delays in some of my changes taking
place. Early on I realised I had the debug option set in my ini file
but even after I had changed it wasn't fixed when I visited the site
in my browser. Is there some caching taking place that I can reset?

On top of that I still have some other problems:

1) I had to remove the SQLAlchemy initialisation because I got this
traceback if I tried to run the dispatch,fcgi file:

Traceback (most recent call last):

...snip

  File "/home/.finnigan/dave_e/lib/python2.4/site-packages/
Pylons-0.9.5-py2.4.egg/pylons/wsgiapp.py", line 234, in __init__
    g = g(config.global_conf, config.app_conf, config=config)
  File "/home/.finnigan/dave_e/lib/python2.4/site-packages/
swifthalf-0.1.0dev_r1-py2.4.egg/swifthalf/lib/app_globals.py", line
30, in __init__
    init_model(app_conf)
  File "/home/.finnigan/dave_e/lib/python2.4/site-packages/
swifthalf-0.1.0dev_r1-py2.4.egg/swifthalf/models/__init__.py", line
16, in init_model
    place.init(metadata)
  File "/home/.finnigan/dave_e/lib/python2.4/site-packages/
swifthalf-0.1.0dev_r1-py2.4.egg/swifthalf/models/place.py", line 22,
in init
    place_table = sa.Table('place', metadata, autoload=True)
  File "build/bdist.linux-i686/egg/sqlalchemy/schema.py", line 142, in
__call__
  File "build/bdist.linux-i686/egg/sqlalchemy/engine/base.py", line
526, in reflecttable
  File "build/bdist.linux-i686/egg/sqlalchemy/databases/mysql.py",
line 355, in reflecttable
sqlalchemy.exceptions.NoSuchTableError: place

So I removed all the init functions to get it running. Am I
initialising all this stuff in the wrong place or the wrong order? It
seems to be the autoload that is breaking. Obviously I have checked
that the tables are actually there, and it does seem to be connecting
to the database ok.

2) In the brief time that it was working correctly I tried to add the
mod_rewrite rules to get rid of the dispatch.fcgi from my url. This
seemed to break it completely, it started returning 500 errors
instantly when I set those rules up.

Sorry if some of these are really obvious fixes. There seems to be no
easy way of debugging these parts of the set up. Any help would be
much appreciated.

Thanks,
Dave


On Jul 14, 6:15 pm, Dave <> wrote:
> Hi there,
>
> I've been developing my pylons app locally for a while now and I'm
> looking to put it up on dreamhost now.
>
> I've read through the docs 
> here:http://wiki.pylonshq.com/display/pylonscookbook/Production+Deployment...
> and the dreamhost bit 
> here:http://blog.micampe.it/articles/2006/11/26/a-tale-of-pylons-python-an...
>
> So I've got a dispatch.fcgi that looks like this:
>
> #!/home/my_username/bin/python
>
> from paste.deploy import loadapp
> from fcgi import WSGIServer
>
> app = loadapp('config:/home/my_username/okasta.com/swifthalf/
> development/development.ini')
> server = WSGIServer(app)
> server.run()
>
> However, I'm not having much luck. When I browse to that page I simply
> get a blank page followed by a 500 internal server error.
>
> I've managed to get a test fcgi file working:
>
> #!/home/my_username/bin/python
>
> from paste.deploy import loadapp
> from fcgi import WSGIServer
>
> def test_app(environ, start_response):
>     start_response('200 OK', [('Content-Type', 'text/plain')])
>     yield 'Hello, world!\n'
>
> WSGIServer(test_app).run()
>
> Can anyone assist?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to