Some trouble with SQLAlchemy. Solved inside.

67 views
Skip to first unread message

Maxim Oganesyan

unread,
May 15, 2013, 10:37:33 AM5/15/13
to turbo...@googlegroups.com
Today I started new project on TG2.
While using tutorial from here after step...

$ paster setup-app development.ini

... I've got an error:

cannot import name exceptions

Error rised by called migration module after model tables were created.

Solved by typing (TurboGears enviroment was active):

$ pip uninstall sqlalchemy
$ pip install sqlalchemy==0.7.9

Looks like SQLA >= 0.8 is beta, so better to use 0.7.9 version.

Best regards.
Maxim.

Alessandro Molina

unread,
May 15, 2013, 10:44:36 AM5/15/13
to TurboGears .
Yes, it's a known issue, it got solved on development branch but is not released yet.

Instead of downgrading SQLA, you can also simply solve it by adding inside your project websetup/__init__.py:

#Monkeypatch for compatibility with SQLA0.8
try:
    from sqlalchemy import exceptions
except ImportError:
    import sqlalchemy
    from sqlalchemy import exc
    sqlalchemy.exceptions = exc




Maxim.

--
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email to turbogears+...@googlegroups.com.
To post to this group, send email to turbo...@googlegroups.com.
Visit this group at http://groups.google.com/group/turbogears?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Mengu

unread,
May 16, 2013, 7:09:18 AM5/16/13
to TurboGears
hi maxim,

fyi, use http://turbogears.readthedocs.org/en/latest/index.html as the
documentation for future reference :)

On May 15, 5:37 pm, Maxim Oganesyan <maxim.oganes...@gmail.com> wrote:
> Today I started new project on TG2.
> While using tutorial from here<http://turbogears.org/2.0/docs/main/DownloadInstall.html>after step...

Maxim Oganesyan

unread,
Jun 5, 2013, 7:02:35 AM6/5/13
to turbo...@googlegroups.com
Hi, Mengu!

Got it.

There were too many docs and instructions in google results, so I didn't know which one is right for today.

Thanks!

четверг, 16 мая 2013 г., 15:09:18 UTC+4 пользователь Mengu написал:

Maxim Oganesyan

unread,
Jun 5, 2013, 9:07:49 AM6/5/13
to turbo...@googlegroups.com
OMG!
"gearbox" instead of "paster"...
What does "-n -x" mean?
Where the hell "which template do You prefer"?

Well, it's OK, it's OK... I'll just calm down and start reading docs. The same shock was 2-3 years ago, when I quickstarted first project...

Peace and prosperity. See You soon. \\//,

среда, 5 июня 2013 г., 15:02:35 UTC+4 пользователь Maxim Oganesyan написал:

Alessandro Molina

unread,
Jun 5, 2013, 2:52:12 PM6/5/13
to TurboGears .
Are you working with current stable or beta release? 
The beta release has replaced paster with gearbox, the options are the same, it just removed the interactive mode of quickstart.

To have a full list of options available in gearbox quickstart you can run "gearbox help quickstart".




--
Message has been deleted

Maxim Oganesyan

unread,
Jun 6, 2013, 5:46:24 AM6/6/13
to turbo...@googlegroups.com
Now I'm using both. Well, new things are not so hard as scared. :) I like them. :)

среда, 5 июня 2013 г., 22:52:12 UTC+4 пользователь Alessandro Molina написал:
Reply all
Reply to author
Forward
0 new messages