Thanks, should have known not to call my controller module the same as the 
webapps.

If I change the name of the controller class, i.e. from TemplateController to 
xxx I get:
exceptions.AttributeError: 'module' object has no attribute 
'TemplateController' 
but 
pylons.routes_dict      {'action': 'test', 'controller': 'template', 'id': 
None} appears to have the right data

Is there something special about the controller class name that I am missing or 
is this a small bug?


> -----Original Message-----
> From: [email protected]
> [mailto:[EMAIL PROTECTED] Behalf Of Philip Jenvey
> Sent: Monday, November 27, 2006 2:49 PM
> To: [email protected]
> Subject: Re: No module named lib.base?
> 
> 
> 
> 
> On Nov 27, 2006, at 11:11 AM, John_Nowlan wrote:
> 
> >
> > I installed pylons 0.9.3
> >
> > Created a new-app
> > hello.py works
> >
> > but when copying my old-app files to new-app and changing  
> > references I get the following error when trying to hit the  
> > controller:
> >
> > File 
> 'C:\\Python24\\lib\\site-packages\\myghty-1.1-py2.4.egg\\myghty 
> > \\importer.py', line 54 in import_module
> >   return builtin_importer(name, globals, locals, fromlist)
> > File 'C:\\Inetpub\\pylonshome\\banner\\banner\\controllers\ 
> > \banner.py', line 1 in ?
> >   from banner.lib.base import *
> > File 
> 'C:\\Python24\\lib\\site-packages\\myghty-1.1-py2.4.egg\\myghty 
> > \\importer.py', line 54 in import_module
> >   return builtin_importer(name, globals, locals, fromlist)
> > ImportError: No module named lib.base
> >
> 
> You can't have a controller module named the same as your webapp's  
> package. This is a python problem -- in this case, it is assumes  
> 'banner' refers to the controller module (a relative import) as  
> opposed to your top level package (an absolute import).
> 
> --
> Philip Jenvey
> 
> 
> > 
> 

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
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