Re: Intermittent encoding error after moving to Apache

2011-10-28 Thread Benjamin Sims
Mystery solved (well this part anyway). I modified the library to write to disk as suggested - turns out there was a weird character in the custom 500 error template. So, whenever another error occurred, this was the only one in the log. Thanks do much for helping me get through this annoying

Re: CSV Reponse

2011-10-28 Thread Bruce Wade
Thank you, that should help. On Fri, Oct 28, 2011 at 2:21 PM, Chris McDonough wrote: > On Fri, 2011-10-28 at 14:16 -0700, Bruce Wade wrote: > > Hello, > > > > > > We are dynamically generating a CSV with a link click, and would like > > to have the response provide the CSV file for download. > >

Re: CSV Reponse

2011-10-28 Thread Chris McDonough
On Fri, 2011-10-28 at 14:16 -0700, Bruce Wade wrote: > Hello, > > > We are dynamically generating a CSV with a link click, and would like > to have the response provide the CSV file for download. > > > What is a good process to handle this? This may help: http://docs.pylonsproject.org/project

Re: Pyramid on cloud

2011-10-28 Thread ravi teja
I like AWS, both in terms of flexibility and the broad cloud stack they provide. I would like to know other's thoughts on AWS. On 29-Oct-2011, at 2:28 AM, Bruce Wade wrote: > What are thoughts on http://www.heroku.com/? > > On Wed, Oct 26, 2011 at 7:49 AM, Thomas G. Willis > wrote: > appengin

CSV Reponse

2011-10-28 Thread Bruce Wade
Hello, We are dynamically generating a CSV with a link click, and would like to have the response provide the CSV file for download. What is a good process to handle this? -- -- Regards, Bruce Wade http://ca.linkedin.com/in/brucelwade http://www.wadecybertech.com http://www.warplydesigned.com

Re: Pyramid on cloud

2011-10-28 Thread Bruce Wade
What are thoughts on http://www.heroku.com/? On Wed, Oct 26, 2011 at 7:49 AM, Thomas G. Willis wrote: > appengine.google.com is not a bad way to go once python 2.7 support is > made official, but you have to write your app for it, and that of course has > it's own benefits and drawbacks. > > --

Re: how to set NO_PERMISSION_REQUIRED for default httpexception views

2011-10-28 Thread Chris McDonough
On Fri, 2011-10-28 at 19:58 +0200, Viktor Nagy wrote: > hi, > > I'm sure that this is a dumb question, but after using > set_default_permission, I always get an ugly error page instead of a > nice redirect to my login page when a restricted page is being > accessed. > > I guess the problem is tha

how to set NO_PERMISSION_REQUIRED for default httpexception views

2011-10-28 Thread Viktor Nagy
hi, I'm sure that this is a dumb question, but after using set_default_permission, I always get an ugly error page instead of a nice redirect to my login page when a restricted page is being accessed. I guess the problem is that HTTPForbidden is restricted too. Thus the question is: how can I add

Re: Celery with Pyramid?

2011-10-28 Thread John Anderson
How did you hook up your celery tasks to only execute if the transaction on the request committed? On Fri, Oct 28, 2011 at 9:35 AM, Łukasz Oleś wrote: > Hi, > > I'm using celery with pyramid without any problems. > I'm using pyramid_tm module which uses transaction module. > > On 28 Paź, 09:36,

Re: match_param not behaving as expected - pyramid-1.2.1-Py2.7

2011-10-28 Thread Michael Merickel
match_param is for matching items in the matchdict. These are patterns in your url, for example if you had the url "/match/{param}", then you might use match_param='param=edit' to only match when that pattern is edit. request_param is used to match the query string in your url (things after the ?-

Re: Celery with Pyramid?

2011-10-28 Thread Łukasz Oleś
Hi, I'm using celery with pyramid without any problems. I'm using pyramid_tm module which uses transaction module. On 28 Paź, 09:36, John Anderson wrote: > I was wondering if any of you guys have used celery with Pyramid.   I'm > looking for a way to have my tasks only execute if the db transact

match_param not behaving as expected - pyramid-1.2.1-Py2.7

2011-10-28 Thread Si
Could anyone explain why the below test for request_param works ok, but the test for match_param does not? MATCH - http://127.0.0.1:8080/request_param?action=anything NO MATCH - http://127.0.0.1:8080/match_param?action=edit Pyramid 1.2.1 / Python 2.7 def vc_request_param(request): return R

pyramid development environment

2011-10-28 Thread clemensherschel
Finally, I am moving an application from pylons to pyramid. This is an opportunity to change platform from windows XP to linux. This offers me an opportunity to review my pyramid development environment. . I am using VM workstation 8. I am relieved to be using unix but am unsure about which

Download File from Pyramid-based Website

2011-10-28 Thread Mark Erbaugh
I'm working on a Pyramid-based website that uses SQLite for its backend (via SQLAlchemy). I want to add a link that will allow an user to download a backup of the SQLite database. Here's what I have so far for the view handler: > 1 import datetime > 2 import cStringIO > 3 import zipfile

Re: Intermittent encoding error after moving to Apache

2011-10-28 Thread cd34
On Oct 28, 10:00 am, Benjamin Sims wrote: > It does sometimes occur on the login page, but also on other pages. It will > fail a few times, then start working for a bit and continue that way. I'm wondering if you ran the app under paster, ran a bunch of wget -S on a small page, typescript so that

Re: Intermittent encoding error after moving to Apache

2011-10-28 Thread Benjamin Sims
It does sometimes occur on the login page, but also on other pages. It will fail a few times, then start working for a bit and continue that way. - There is nothing custom in terms of cookies or headers; a session cookie and some auth_tkts produced by standard login. - il8n is set up, yes - I wi

Re: Celery with Pyramid?

2011-10-28 Thread Chris McDonough
On Fri, 2011-10-28 at 02:36 -0500, John Anderson wrote: > I was wondering if any of you guys have used celery with Pyramid. > I'm looking for a way to have my tasks only execute if the db > transaction commits. That way any data the task expects is in the db > and the task only executes if the da

Celery with Pyramid?

2011-10-28 Thread John Anderson
I was wondering if any of you guys have used celery with Pyramid. I'm looking for a way to have my tasks only execute if the db transaction commits. That way any data the task expects is in the db and the task only executes if the data is valid. -- You received this message because you are su

Re: Intermittent encoding error after moving to Apache

2011-10-28 Thread cd34
On Oct 28, 8:32 am, Benjamin Sims wrote: > - I'm not sending any binary data that I'm aware of; page content is text > from the MySQL database. Sometimes this error even occurs on my login page, > which does very little other than display a welcome and a form > > - There are no events of subscribe

Re: Pyramid Chameleon

2011-10-28 Thread Mark Erbaugh
On Oct 28, 2011, at 2:38 AM, Malthe Borch wrote: > On 27 October 2011 23:02, Mark Erbaugh wrote: >> In the Zope2 Book (documentation), section 27.22.1 mentions special handling >> of the tal:condition operation when ued with the checked or selected >> attributes which makes it easier to pass a

Re: Intermittent encoding error after moving to Apache

2011-10-28 Thread Benjamin Sims
The two were both set at 3600; I've now changed the pool_recycle to 60, so hopefully that will help. I seem to be seeing the error less often since I removed some cron jobs which had a tendency to hang, so it might be that that has resolved the situation - I'm waiting to see. Regarding your other

Re: Intermittent encoding error after moving to Apache

2011-10-28 Thread cd34
On Oct 28, 6:27 am, Benjamin Sims wrote: > sqlalchemy.pool_recycle = 3600 Your pool_recycle needs to be less than /etc/mysql/my.cnf:interactive_timeout= That typically fixes that. I actually run with pool_recycle=60 and I've not seen that error since. As for your UTF error: [Fri Oct 28 02:03:

Re: Intermittent encoding error after moving to Apache

2011-10-28 Thread Benjamin Sims
I do have: sqlalchemy.pool_recycle = 3600 but it doesn't seem to always solve it. However, I don't believe that the encoding error is related and that is far more worrying to me, as it occurs more frequently. Ben On 27 October 2011 20:50, Michael Merickel wrote: > The MySQL errors are likel