Studio Database - No tables added

8 views
Skip to first unread message

CoreyC

unread,
Mar 10, 2011, 2:35:40 PM3/10/11
to Studio
I have completed a test install using each postgres and mysql, neither
of them create any tables in the db.

We are unable to use sqlite due to permissions issues.

Can someone reveal the Studio db structure for MySQL. - and the
minimal requirements to complete a login?

Thanks!

Eric Lemoine

unread,
Mar 10, 2011, 4:10:52 PM3/10/11
to studio-...@googlegroups.com, CoreyC

I just tried and the current version of Studio does indeed not work
MySQL. This is because MySQL requires that a length for VARCHARs. I'll
propose a fix for that. Thanks for reporting the issue.

--
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.l...@camptocamp.com
http://www.camptocamp.com

CoreyC

unread,
Mar 10, 2011, 5:24:18 PM3/10/11
to Studio
Thanks - I tried to reverse engineer the tables from the error logs, I
think it is happy with the structure. Although it needs some base data
present to function properly.

Any possibility of a dump and login? Or will a fix be ready soon
enough?

On Mar 10, 1:10 pm, Eric Lemoine <eric.lemo...@camptocamp.com> wrote:
> On Thu, Mar 10, 2011 at 8:35 PM, CoreyC <fruitwe...@gmail.com> wrote:
> > I have completed a test install using each postgres and mysql, neither
> > of them create any tables in the db.
>
> > We are unable to use sqlite due to permissions issues.
>
> > Can someone reveal the Studio db structure for MySQL. - and the
> > minimal requirements to complete a login?
>
> I just tried and the current version of Studio does indeed not work
> MySQL. This is because MySQL requires that a length for VARCHARs. I'll
> propose a fix for that. Thanks for reporting the issue.
>
> --
> Eric Lemoine
>
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
>
> Tel : 00 33 4 79 44 44 96
> Mail : eric.lemo...@camptocamp.comhttp://www.camptocamp.com

Miroslav Novta

unread,
Mar 11, 2011, 2:39:57 PM3/11/11
to Studio
Hi all,

I have installed all successfully but after configuration and start up
I have failed to login. I have used the same PostgreSQL database for
both sqlalchemy.url and default_datastore_postgis. And it seems the
user table is not created but required.
Is there a SQL script for postgres able to span the issue?

Error log is here:

Fri Mar 11 05:41:54 2011] [error] [client 109.121.94.91]
^, referer: http://mape.grajs.co.rs/studio/signin
[Fri Mar 11 05:41:54 2011] [error] [client 109.121.94.91] 'SELECT
"user".password AS user_password, "user".id AS user_id, "user".name AS
user_name, "user".login AS user_login \\nFROM "user" \\nWHERE
"user".login = %(login_1)s \\n LIMIT 2 OFFSET 0' {'login_1': 'admin'},
referer: http://mape.grajs.co.rs/studio/signin
[Fri Mar 11 05:44:28 2011] [error] [client 109.121.94.91] Error -
<class 'sqlalchemy.exc.ProgrammingError'>: (ProgrammingError) relation
"user" does not exist, referer: http://mape.grajs.co.rs/studio/signin

Bruno Binet

unread,
Mar 11, 2011, 4:50:59 PM3/11/11
to studio-...@googlegroups.com, Miroslav Novta

The paster setup-app command is in charge of setting up the database
(creating tables and inserting default data).
Have you successfully executed this command?
http://camptocamp.github.com/Studio/installation_guide.html#set-up

> Error log is here:
>
> Fri Mar 11 05:41:54 2011] [error] [client 109.121.94.91]
> ^, referer: http://mape.grajs.co.rs/studio/signin
> [Fri Mar 11 05:41:54 2011] [error] [client 109.121.94.91]  'SELECT
> "user".password AS user_password, "user".id AS user_id, "user".name AS
> user_name, "user".login AS user_login \\nFROM "user" \\nWHERE
> "user".login = %(login_1)s \\n LIMIT 2 OFFSET 0' {'login_1': 'admin'},
> referer: http://mape.grajs.co.rs/studio/signin
> [Fri Mar 11 05:44:28 2011] [error] [client 109.121.94.91] Error -
> <class 'sqlalchemy.exc.ProgrammingError'>: (ProgrammingError) relation
> "user" does not exist, referer: http://mape.grajs.co.rs/studio/signin
>

--
Bruno Binet

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Mail : bruno...@camptocamp.com
http://www.camptocamp.com

CoreyC

unread,
Mar 11, 2011, 8:18:14 PM3/11/11
to Studio
Any chance this is related to Python 2.6.5? Miroslav and I are on the
same server configuration. I am not sure of the popularity of Studio
but I was expecting more people encountering this issue.

The setup script does complete properly, because when using sqlite it
is possible to login. Although using sqlite and WSGI does not work so
well - we are unable to write to the sqlite db, even with chmod 777 as
back as we securely can.


Eric, Bruno if you can't replicate this issue, you can contact me and
I can provide a login on a test domain to diagnose this further.

Thanks!

On Mar 11, 1:50 pm, Bruno Binet <bruno.bi...@camptocamp.com> wrote:
> Have you successfully executed this command?http://camptocamp.github.com/Studio/installation_guide.html#set-up
>
> > Error log is here:
>
> > Fri Mar 11 05:41:54 2011] [error] [client 109.121.94.91]
> > ^, referer:http://mape.grajs.co.rs/studio/signin
> > [Fri Mar 11 05:41:54 2011] [error] [client 109.121.94.91]  'SELECT
> > "user".password AS user_password, "user".id AS user_id, "user".name AS
> > user_name, "user".login AS user_login \\nFROM "user" \\nWHERE
> > "user".login = %(login_1)s \\n LIMIT 2 OFFSET 0' {'login_1': 'admin'},
> > referer:http://mape.grajs.co.rs/studio/signin
> > [Fri Mar 11 05:44:28 2011] [error] [client 109.121.94.91] Error -
> > <class 'sqlalchemy.exc.ProgrammingError'>: (ProgrammingError) relation
> > "user" does not exist, referer:http://mape.grajs.co.rs/studio/signin
>
> --
> Bruno Binet
>
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
>
> Mail : bruno.bi...@camptocamp.comhttp://www.camptocamp.com

Eric Lemoine

unread,
Mar 12, 2011, 4:25:43 AM3/12/11
to studio-...@googlegroups.com
On Saturday, March 12, 2011, CoreyC <fruit...@gmail.com> wrote:
> Any chance this is related to Python 2.6.5? Miroslav and I are on the
> same server configuration. I am not sure of the popularity of Studio
> but I was expecting more people encountering this issue.

There may be two problems, one specific to MySQL, and one specific to
PostgreSQL.

As I said earlier in this thread I've been able to reproduce the issue
with MySQL. With MySQL setup-app fails because we attempt to create
VARCHAR colums of undefined lengths, which MySQL doesn't support.
Changing all occurences of sa.types.String to sa.types.String(255) in
the Studio model code makes setup-app successfully complete with
MySQL. I have a pull request pending for my changes, but I'm not yet
confident with these changes as limiting the lengths of our strings to
255 may not always be appropriate, especially for the JSON custom type
that we define.


>
> The setup script does complete properly, because when using sqlite it
> is possible to login. Although using sqlite and WSGI does not work so
> well - we are unable to write to the sqlite db, even with chmod 777 as
> back as we securely can.

Our live demo does rely on SQLite and Apache mod_wsgi. The db file
*and* the directory containing that db file must be writable by the
Apache user (www-data).


>
>
> Eric, Bruno if you can't replicate this issue, you can contact me and
> I can provide a login on a test domain to diagnose this further.

--
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96

Mail : eric.l...@camptocamp.com
http://www.camptocamp.com

Eric Lemoine

unread,
Mar 12, 2011, 6:01:24 PM3/12/11
to studio-...@googlegroups.com
On Sat, Mar 12, 2011 at 10:25 AM, Eric Lemoine
<eric.l...@camptocamp.com> wrote:
> On Saturday, March 12, 2011, CoreyC <fruit...@gmail.com> wrote:
>> Any chance this is related to Python 2.6.5? Miroslav and I are on the
>> same server configuration. I am not sure of the popularity of Studio
>> but I was expecting more people encountering this issue.
>
> There may be two problems, one specific to MySQL, and one specific to
> PostgreSQL.
>
> As I said earlier in this thread I've been able to reproduce the issue
> with MySQL. With MySQL setup-app fails because we attempt to create
> VARCHAR colums of undefined lengths, which MySQL doesn't support.
> Changing all occurences of sa.types.String to sa.types.String(255) in
> the Studio model code makes setup-app successfully complete with
> MySQL. I have a pull request pending for my changes, but I'm not yet
> confident with these changes as limiting the lengths of our strings to
> 255 may not always be appropriate, especially for the JSON custom type
> that we define.

Here's the pull request:
<https://github.com/camptocamp/Studio/pull/7>. I think it's in good
shape now. All tests pass with SQLite, MySQL and PostgreSQL. Once
pulled I'll release 0.5.1, and update the go-studio.py script
accordingly.

Bruno, it'd be great if you could take a look at my pull request. Thanks.

CoreyC

unread,
Mar 12, 2011, 6:15:27 PM3/12/11
to Studio
Thanks Eric - One of the few things I am not skilled in is Python and
GitHub :)

Hope to see this soon!

On Mar 12, 3:01 pm, Eric Lemoine <eric.lemo...@camptocamp.com> wrote:
> On Sat, Mar 12, 2011 at 10:25 AM, Eric Lemoine
>
>
>
> <eric.lemo...@camptocamp.com> wrote:
> Mail : eric.lemo...@camptocamp.comhttp://www.camptocamp.com

Eric Lemoine

unread,
Mar 13, 2011, 12:17:18 PM3/13/11
to studio-...@googlegroups.com
On Sun, Mar 13, 2011 at 12:01 AM, Eric Lemoine

<eric.l...@camptocamp.com> wrote:
> On Sat, Mar 12, 2011 at 10:25 AM, Eric Lemoine
> <eric.l...@camptocamp.com> wrote:
>> On Saturday, March 12, 2011, CoreyC <fruit...@gmail.com> wrote:
>>> Any chance this is related to Python 2.6.5? Miroslav and I are on the
>>> same server configuration. I am not sure of the popularity of Studio
>>> but I was expecting more people encountering this issue.
>>
>> There may be two problems, one specific to MySQL, and one specific to
>> PostgreSQL.
>>
>> As I said earlier in this thread I've been able to reproduce the issue
>> with MySQL. With MySQL setup-app fails because we attempt to create
>> VARCHAR colums of undefined lengths, which MySQL doesn't support.
>> Changing all occurences of sa.types.String to sa.types.String(255) in
>> the Studio model code makes setup-app successfully complete with
>> MySQL. I have a pull request pending for my changes, but I'm not yet
>> confident with these changes as limiting the lengths of our strings to
>> 255 may not always be appropriate, especially for the JSON custom type
>> that we define.
>
> Here's the pull request:
> <https://github.com/camptocamp/Studio/pull/7>. I think it's in good
> shape now. All tests pass with SQLite, MySQL and PostgreSQL. Once
> pulled I'll release 0.5.1, and update the go-studio.py script
> accordingly.
>
> Bruno, it'd be great if you could take a look at my pull request. Thanks.

Thanks for the review Bruno.

0.5.1 is relased. To upgrade an existing virtualenv use <easy_install
-U studio> (the virtualenv must have been activated prior to running
this command).

Reply all
Reply to author
Forward
0 new messages