I packaged my first TG app as an egg, and installed it successfully to a
test machine.

When I run
$ sudo tg-admin --config=prod.cfg sql create
to create the initial blank database, I get the following error:

-=-
Using database URI sqlite:///home/aji/simpleshelfdata/ssdata.sqlite

This project seems incomplete. In order to use the sqlobject commands
without manually specifying a model, there needs to be an
egg-info directory with an appropriate sqlobject.txt file.

I can fix this automatically. Would you like me to?

Enter [y] or n:
Traceback (most recent call last):
  File "/usr/bin/tg-admin", line 7, in ?
    sys.exit(
  File
"/usr/lib/python2.4/site-packages/TurboGears-1.0.2.2-py2.4.egg/turbogears/co
mmand/base.py", line 389, in main
    command.run()
  File
"/usr/lib/python2.4/site-packages/TurboGears-1.0.2.2-py2.4.egg/turbogears/co
mmand/base.py", line 135, in run
    eggname = self.fix_egginfo(eggname)
  File
"/usr/lib/python2.4/site-packages/TurboGears-1.0.2.2-py2.4.egg/turbogears/co
mmand/base.py", line 159, in fix_egginfo
    imp.load_module("setup", *imp.find_module("setup", ["."]))
ImportError: No module named setup
-=-

Notes:
- My dev machine and test virtual machine are both Linux (Kubuntu 6.06.1).
- I ran tg-admin from
/usr/lib/python2.4/site-packages/simpleshelf-0.4.1-py2.4.egg, which contains
2 directories: EGG-INFO and simpleshelf (same layout as the other eggs on my
system AFAICT).
- I selected "y" at the prompt (selecting "n" just stops the script).
- The path to the database exists, but the database file does not.
- In EGG-INFO there is a sqlobject.txt file with these contents:

  db_module=simpleshelf.model
  history_dir=$base/simpleshelf/sqlobject-history

- The simpleshelf package contains "model.py", which is a SQLObject module
(nothing fancy).
- Nowhere in the egg is a module named "setup.py" (also true of the other
eggs on my system).
- If I run the same command on my development machine, against a prod.cfg in
a similar location (outside the development directory), tg-admin creates the
database as expected.

So what am I doing wrong?

Thanks,

Andrew Ittner



--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to