On 05/04/06, Kevin Dangoor <[EMAIL PROTECTED]> wrote:
>
> On 4/5/06, Italo Maia <[EMAIL PROTECTED]> wrote:
> >
> > Well, after upgrading from version 9.2 to 9.3, my model.py is no longer
> > working. When i try the tg-admin sql create, i get the error :
> > modulename= package + ".config.app"
> > TypeError unsuported operand type(s) for +: 'NoneType' and 'str'
>
> What directory were you in when you typed "tg-admin sql create"? What
> was the name of the quickstarted project? The error above would only
> occur if your project's package couldn't be located.
>
> A quick test worked fine for me.

I get a similar error with the TurboTunes example.

This is what I did:

[EMAIL PROTECTED]:~/Projects/Python/TurboGears$ tg-admin quickstart
[EMAIL PROTECTED]:~/Projects/Python/TurboGears$ cd TurboTunes/
[EMAIL PROTECTED]:~/Projects/Python/TurboGears/TurboTunes$ vi dev.cfg ; vi 
prod.cfg
[EMAIL PROTECTED]:~/Projects/Python/TurboGears/TurboTunes$ vi 
turbotunes/model.py
[EMAIL PROTECTED]:~/Projects/Python/TurboGears/TurboTunes$ tg-admin sql create

Should I be in another directory when I execute "tg-admin sql create"?

Here's what the (first and second level) directories look like:

[EMAIL PROTECTED]:~/Projects/Python/TurboGears/TurboTunes$ ls -1 *
dev.cfg
prod.cfg
README.txt
setup.py
setup.pyc
start-turbotunes.py

turbotunes:
config
controllers.py
model.py
release.py
sqlobject-history
static
templates
tests

TurboTunes.egg-info:
not-zip-safe
paster_plugins.txt
PKG-INFO
requires.txt
SOURCES.txt
sqlobject.txt
top_level.txt

Should there be a __init__.py file in the 'TurboTunes.egg-info' directory?

In site-packages/TurboGears-0.9a3-py2.4.egg/turbogears/command/base.py
there is a line that sets the value of package:

 package = get_package_name()
 turbogears.update_config(configfile=config,
            modulename = package + ".config.app") <barf occurs here>

"package" seems to be set to None.

Looking at "turbogears.util.get_package_name()" it looks like
setuptools.find_packages() is looking for a directory containing
__init__.py. I guess that should be 'TurboTunes.egg-info'?

That probably does not help -- until a few day's ago I had only used
eggs for making french toast.

Thanks,
Ryan

--
Ryan Tracey
Citizen: The World

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to