Unfortunately, you've officially done more with sqlautocode than I have. The
single best recommendation I can make for your case is to update your
database so that the table that does not have the primary key has a primary
key. I don't know if this is an absolute requirement for SQLAlchemy, but it
certainly seems like it should be. After all, how can it map an object to a
database row without a way to identify that row?

Beyond that, I don't think I can do much more.

On Tue, Feb 15, 2011 at 7:50 AM, Vineet D. <[email protected]> wrote:

> This seems to be an issue with version conflicts.
> I removed SA 0.6 and easy_installed SA 0.5.1
> Now it works.....but....
> 1] When there is a table without primary key, it spits traceback.
> 2] It ignores -t tablename option silently.
>
> Can anybody pl. advise on this?
>
> Thanks,
> Vineet
> ==================================
>
> On Feb 15, 12:08 pm, "Vineet D." <[email protected]> wrote:
> > Michael,
> > you were right.
> > I was firing the command from python shell.
> > I fired it now from win cmd shell.
> > =============
> > Now another hitch.
> > =============
> > After firing sqlautocode mysql+mysqldb:\\user:pswd@hostname:
> > 3306\schemaname -o tables.py
> > it says ....Starting
> > Then traceback--- Attribute Error: 'MySQLDialect_mysqldb'object has no
> > attribute 'get_default_schema_name'
> > I can provide full traceback, if needed.
> >
> > How can I resolve this!
> > Thanks,
> > Vineet.
> >
> > On Feb 15, 10:22 am, Michael Pedersen <[email protected]> wrote:
> >
> > > Wait, you're running that from a python shell? sqlautocode is a command
> line
> > > tool. Exit the GUI, run the command on the command line, and then
> you'll be
> > > able to load tables.py..
> >
> > > On Mon, Feb 14, 2011 at 11:47 PM, Vineet D. <[email protected]
> >wrote:
> >
> > > > Thanks Michael,.
> >
> > > > I tried with the remedy you suggested.
> > > > But still the same error.
> > > > When run on IDLE GUI, it highlights "mysql" word and shows syntax
> > > > error.
> > > > ---SyntaxError: invalid syntax---  this is the only traceback.
> >
> > > > When I try for help,
> > > > >>sqlautocode -help    (also tried --help and -h)
> >
> > > > it gives---
> >
> > > > Traceback (most recent call last):
> > > >  File "<pyshell#12>", line 1, in <module>
> > > >    sqlautocode -help
> > > > TypeError: unsupported operand type(s) for -: 'module' and '_Helper'
> >
> > > > Any further advice pl.!
> > > >  ----Vineet
> >
> > > > On Feb 14, 10:34 pm, Michael Pedersen <[email protected]> wrote:
> > > > > Without having a stack trace, we can only guess. Based on what you
> have
> > > > > shown, my only guess would be that you are specifying an invalid
> URL. You
> > > > > are using \, when it should be /. For example, you use this:
> >
> > > > > On Mon, Feb 14, 2011 at 11:46 AM, Vineet D. <
> [email protected]
> > > > >wrote:
> >
> > > > > > >> sqlautocode mysql:\\username:pswd@hostname:3306\schema_name
> -o
> > > > > > tables.py
> >
> > > > > When it should be this:
> >
> > > > > sqlautocode mysql://username:pswd@hostname:3306/schema_name -o
> tables.py
> > > > > --
> > > > > Michael J. Pedersen
> > > > > My IM IDs: Jabber/[email protected], ICQ/103345809,
> > > > AIM/pedermj022171
> > > > >           Yahoo/pedermj2002, MSN/[email protected]
> >
> > > > --
> > > > 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.
> >
> > > --
> > > Michael J. Pedersen
> > > My IM IDs: Jabber/[email protected], ICQ/103345809,
> AIM/pedermj022171
> > >           Yahoo/pedermj2002, MSN/[email protected]
>
> --
> 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.
>
>


-- 
Michael J. Pedersen
My IM IDs: Jabber/[email protected], ICQ/103345809, AIM/pedermj022171
          Yahoo/pedermj2002, MSN/[email protected]

-- 
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