Re: Having some trouble getting started with Pylons
Now I'm having new troubles. I keep getting this error: ValueError: bad marshal data I have no idea what this means. I am trying to follow the tutorial. As I understand it, I am supposed to add this line to routing.py. map.connect('', controller='hello', action='index') I am not sure exactly where I am supposed to add that line, or if I am supposed to replace another line. This is what I have. # CUSTOM ROUTES HERE map.connect('', controller='hello', action='index') map.connect(':controller/:action/:id') map.connect('*url', controller='template', action='view') But when I try: paster controller hello I get that ValueError: bad marshal data and I do not get a hello controller created. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Having some trouble getting started with Pylons
On Mon, 2008-01-28 at 06:38 -0800, walterbyrd wrote: Now I'm having new troubles. I keep getting this error: ValueError: bad marshal data I have no idea what this means. It means you have corrupt .pyc files. If you're on *nix you can just execute: find myPylonsApp -name *.pyc -exec rm {} \; If that doesn't fix it, you might need to do the same thing in your site-packages directory, but that's less likely. Regards, Cliff --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Having some trouble getting started with Pylons
On Jan 28, 8:00 am, Cliff Wells [EMAIL PROTECTED] wrote: On Mon, 2008-01-28 at 06:38 -0800, walterbyrd wrote: Now I'm having new troubles. I keep getting this error: ValueError: bad marshal data I have no idea what this means. It means you have corrupt .pyc files. If you're on *nix you can just execute: find myPylonsApp -name *.pyc -exec rm {} \; That did it. Thank you for all your help. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Having some trouble getting started with Pylons
On Jan 26, 7:25 pm, Mike Orr [EMAIL PROTECTED] wrote: In production.ini (development.ini for now): host = 12 7.0.0.1 port = 8080 Here is what I have: /var/www/helloworld# ls *.ini development.ini test.ini /var/www/helloworld# wget http://127.0.0.1:8080 --09:54:01-- http://127.0.0.1:8080/ = `index.html.3' Connecting to 127.0.0.1:8080... failed: Connection refused. Is that okay? The only time you'd put 0.0.0.0 or your public IP in production.ini is if you're not running Apache/lighthttpd and you want the public to access the Paste HTTP server directly. In that case it must run on port 80 or users will have to put the :port_number in their URL. And the program would have to run as root to open port 80. That might work for me. I am just trying to install, and learn, some Pylons right now. I have root access. I will not need to have anything accessed by the public for a few weeks, at least. If it is any easier to get started, I am willing to sacrifice public access. At least for now. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Having some trouble getting started with Pylons
On Sun, 2008-01-27 at 09:04 -0800, walterbyrd wrote: Here is what I have: /var/www/helloworld# ls *.ini development.ini test.ini /var/www/helloworld# wget http://127.0.0.1:8080 --09:54:01-- http://127.0.0.1:8080/ = `index.html.3' Connecting to 127.0.0.1:8080... failed: Connection refused. Is that okay? I'm going to be frank: you aren't giving anywhere near enough information for anyone to help you. Did you actually start pylons with paster serve development.ini? Cliff --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Having some trouble getting started with Pylons
On Jan 27, 2008 9:04 AM, walterbyrd [EMAIL PROTECTED] wrote: On Jan 26, 7:25 pm, Mike Orr [EMAIL PROTECTED] wrote: In production.ini (development.ini for now): host = 12 7.0.0.1 port = 8080 Here is what I have: /var/www/helloworld# ls *.ini development.ini test.ini /var/www/helloworld# wget http://127.0.0.1:8080 --09:54:01-- http://127.0.0.1:8080/ = `index.html.3' Connecting to 127.0.0.1:8080... failed: Connection refused. Is that okay? No, it means the Pylons app is not running. Or more precisely, that no service is running on port 8080. -- Mike Orr [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Having some trouble getting started with Pylons
On Jan 26, 12:03 am, Cliff Wells [EMAIL PROTECTED] wrote: 3) run links (in the VPS) and try to connect to 127.0.0.1:5000 I edited development.ini, and set the host back to it's default of 0.0.0.0. I tried connecting with 127.0.0.1:5000, but I got the same connection refused error. If I run links, and connect to 127.0.0.1 with no port specified, it works just like connecting to the site from outside with real_ip. I am using lighttpd as my primary web server. I am not using a proxy, I don't have any traffic yet. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Having some trouble getting started with Pylons
On Sat, 2008-01-26 at 05:16 -0800, walterbyrd wrote: On Jan 26, 12:03 am, Cliff Wells [EMAIL PROTECTED] wrote: 3) run links (in the VPS) and try to connect to 127.0.0.1:5000 I edited development.ini, and set the host back to it's default of 0.0.0.0. I tried connecting with 127.0.0.1:5000, but I got the same connection refused error. If I run links, and connect to 127.0.0.1 with no port specified, it works just like connecting to the site from outside with real_ip. If it connects with no port specified, then it is connecting to port 80. It's certainly not connecting directly to Pylons. I am using lighttpd as my primary web server. I am not using a proxy, I don't have any traffic yet. If you are already running Lighty, why not just have it proxy to the Pylons app? Avoiding this is just making your life more difficult. Cliff --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Having some trouble getting started with Pylons
On Sat, 2008-01-26 at 05:16 -0800, walterbyrd wrote: On Jan 26, 12:03 am, Cliff Wells [EMAIL PROTECTED] wrote: 3) run links (in the VPS) and try to connect to 127.0.0.1:5000 I edited development.ini, and set the host back to it's default of 0.0.0.0. I tried connecting with 127.0.0.1:5000, but I got the same connection refused error. Sorry, I think I misread this in my previous reply. By I tried connecting with 127.0.0.1:5000 you mean you tried to use links to connect to that port/address? If you can't connect over localhost, then you've got a misconfiguration in your firewall or somehow you aren't doing what you think you're doing with Pylons. Does your Pylons config reference another .ini file? Maybe the port is getting overridden there. And I don't want to sound condescending, but are you sure you're using the .ini file that you've been editing? The problem you are having seems so unlikely that I think you need to recheck your assumptions at every step. Also, you should check your system logs. If it's a system misconfiguration issue (i.e. firewall) you should see something show up there when you try to connect. If I run links, and connect to 127.0.0.1 with no port specified, it works just like connecting to the site from outside with real_ip. That's expected. I am using lighttpd as my primary web server. I am not using a proxy, I don't have any traffic yet. I stand by my earlier statement that avoiding using Lighty as a proxy is misguided. It might sound more complex, but in reality it's probably simpler (and more secure) than the options. Regards, Cliff --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Having some trouble getting started with Pylons
On Jan 26, 1:21 pm, Cliff Wells [EMAIL PROTECTED] wrote: On Sat, 2008-01-26 at 05:16 -0800,walterbyrdwrote: If you are already running Lighty, why not just have it proxy to the Pylons app? Avoiding this is just making your life more difficult. I don't know how. I am brand new to pylons, and fairly new to lighty. I am trying to follow the install instructions as closely as I can. I don't think the ports are blocked. The installation seemed to go smoothly, up to this point. But, it appears that I have missed something major. The directories seem to set up correctly. Python seems to work. I am able to connect to my website. I think I only have one development.ini file. Editing the development.ini seems straight- forward: hosts = 0.0.0.0. port = 5000. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Having some trouble getting started with Pylons
Water, To weed out the fact that the firewall may be an issue, try running Lighty on port 5000. If you are able to download your home page when you run this on your server: wget 'http://127.0.0.1:5000/' Then you can be sure that it's not a firewall issue. Otherwise, you are going to have to start messing around with your iptables configuration to allow local traffic on port 5000. Cheers, Chad On Jan 26, 2008 4:08 PM, walterbyrd [EMAIL PROTECTED] wrote: On Jan 26, 1:21 pm, Cliff Wells [EMAIL PROTECTED] wrote: On Sat, 2008-01-26 at 05:16 -0800,walterbyrdwrote: If you are already running Lighty, why not just have it proxy to the Pylons app? Avoiding this is just making your life more difficult. I don't know how. I am brand new to pylons, and fairly new to lighty. I am trying to follow the install instructions as closely as I can. I don't think the ports are blocked. The installation seemed to go smoothly, up to this point. But, it appears that I have missed something major. The directories seem to set up correctly. Python seems to work. I am able to connect to my website. I think I only have one development.ini file. Editing the development.ini seems straight- forward: hosts = 0.0.0.0. port = 5000. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Having some trouble getting started with Pylons
On Jan 26, 2008 4:08 PM, walterbyrd [EMAIL PROTECTED] wrote: On Jan 26, 1:21 pm, Cliff Wells [EMAIL PROTECTED] wrote: On Sat, 2008-01-26 at 05:16 -0800,walterbyrdwrote: If you are already running Lighty, why not just have it proxy to the Pylons app? Avoiding this is just making your life more difficult. I don't know how. I am brand new to pylons, and fairly new to lighty. I am trying to follow the install instructions as closely as I can. I don't think the ports are blocked. The installation seemed to go smoothly, up to this point. But, it appears that I have missed something major. The directories seem to set up correctly. Python seems to work. I am able to connect to my website. I think I only have one development.ini file. Editing the development.ini seems straight- forward: hosts = 0.0.0.0. port = 5000. I don't know lighty but here's the Apache syntax. ProxyPass /http://127.0.0.1:8080/ ProxyPassReverse / http://127.0.0.1:8080/ The first line forwards public requests to your Pylons application running on port 8080. (You can choose any port above 1024 that's not already in use.) Apache is presumably running on port 80, but that doesn't matter. The second line adjusts the HTTP headers in the response so that absolute URLs point to the Apache port rather than the application port. In production.ini (development.ini for now): host = 12 7.0.0.1 port = 8080 This makes the Paste HTTP server (Pylons application) accept requests from the localhost but not from the public. This is a security feature in some apps, especially if Apache is doing SSL or authorization: accessing the Pylons app directly would bypass these security measures. Just translate the syntax to lighthttpd and it should work. The only time you'd put 0.0.0.0 or your public IP in production.ini is if you're not running Apache/lighthttpd and you want the public to access the Paste HTTP server directly. In that case it must run on port 80 or users will have to put the :port_number in their URL. And the program would have to run as root to open port 80. -- Mike Orr [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Having some trouble getting started with Pylons
On Jan 22, 8:17 pm, Cliff Wells [EMAIL PROTECTED] wrote: On Tue, 2008-01-22 at 11:38 -0800, Mike Orr wrote: It looks like he doesn't have ctypes for some reason (probably Python 2.4). I have tried going on to the next step, displaying hello world with 127.0.0.1:5000 in the URL. Since I using VPS hosting, I edited the development.ini file to have my actual IP address, instead of 127.0.0.1. But it does not work at all: can't establish a connection to the server FWIW: /var/www# python Python 2.4.4 (#2, Apr 5 2007, 20:11:18) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Having some trouble getting started with Pylons
I have been trying to follow the install instructions here. http://wiki.pylonshq.com/display/pylonsdocs/Home Everything was going okay until I tried this: wb:/var/www/helloworld# paster serve --reload development.ini Starting subprocess with file monitor Starting server in PID 3751. 09:45:52,844 INFO [paste.httpserver.ThreadPool] Cannot use kill_thread_limit as ctypes/killthread is not available serving on 0.0.0.0:5000 view at http://127.0.0.1:5000 I am not doing this on my local system. I am using VPS hosting. I think the problem is with the 127.0.0.1 address. But I am not sure how to fix it. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Having some trouble getting started with Pylons
I meant to ask, which operating system and virtual server product is your ISP using? How do they provide Python? (I.e.,anything you know about who compiled Python, where it's located, and what kinds of Python add-ons the ISP provide? -- Mike Orr [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Having some trouble getting started with Pylons
On Jan 22, 12:40 pm, Mike Orr [EMAIL PROTECTED] wrote: I meant to ask, which operating system and virtual server product is your ISP using? How do they provide Python? I'm sorry, I should have mentioned that. The OS is Debian Etch. I installed Python with a standard apt-get. I am using lighttpd - not apache. Up until this, the install was going very smoothly. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Having some trouble getting started with Pylons
On Tue, 2008-01-22 at 11:38 -0800, Mike Orr wrote: On Jan 22, 2008 8:53 AM, walterbyrd [EMAIL PROTECTED] wrote: I have been trying to follow the install instructions here. http://wiki.pylonshq.com/display/pylonsdocs/Home Everything was going okay until I tried this: wb:/var/www/helloworld# paster serve --reload development.ini Starting subprocess with file monitor Starting server in PID 3751. 09:45:52,844 INFO [paste.httpserver.ThreadPool] Cannot use kill_thread_limit as ctypes/killthread is not available serving on 0.0.0.0:5000 view at http://127.0.0.1:5000 I am not doing this on my local system. I am using VPS hosting. I think the problem is with the 127.0.0.1 address. But I am not sure how to fix it. The message means your platform doesn't have a certain threading feature, or possibly that a C file was misconfigured at compilation. It looks like he doesn't have ctypes for some reason (probably Python 2.4). As an aside, once you've fixed this you'll start getting a different INFO message on occassion informing you that 0 threads were killed =) Regards, Cliff --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---