Jamu Kakar | 4 Apr 2008 20:26
Favicon

Re: can please somewone include the patch from bug 177107

Hi Bernd,

Bernd Dorn wrote:
 > we have problems in our tests, because of this bug, which we send a
 > patch here
 >
 > https://bugs.launchpad.net/storm/+bug/177107
 >
 > can anyone merge this into trunk

FYI, this was merged to trunk a few days ago.

Thanks,
J.

Bernd Dorn | 5 Apr 2008 12:59
Favicon

Re: can please somewone include the patch from bug 177107


On 04.04.2008, at 20:26, Jamu Kakar wrote:
> Hi Bernd,
>
> Bernd Dorn wrote:
> > we have problems in our tests, because of this bug, which we send a
> > patch here
> >
> > https://bugs.launchpad.net/storm/+bug/177107
> >
> > can anyone merge this into trunk
>
> FYI, this was merged to trunk a few days ago.
>
> Thanks,
> J.

nice to hear :-) thx

--

-- 
Lovely Systems, senior developer

phone: +43 5572 908060, fax: +43 5572 908060-77
Schmelzhütterstraße 26a, 6850 Dornbirn, Austria
skype: bernd.dorn

Attachment (smime.p7s): application/pkcs7-signature, 2548 bytes

(Continue reading)

Jorgen Bodde | 9 Apr 2008 09:06
Picon

py2exe problems

Hi everybody,

I would like to distribute my wxPython app using Storm as executable.
I use py2exe for that, but the following error (after creating the
exe) puzzles me:

D:\personal\src\airs\dist>airs.exe
Traceback (most recent call last):
  File "airs.py", line 22, in ?
  File "wx\_core.pyc", line 7836, in __init__
  File "wx\_core.pyc", line 7433, in _BootstrapApp
  File "gui\airsApp.pyc", line 21, in OnInit
  File "gui\AirsFrame.pyc", line 47, in __init__
  File "data\viewmgr.pyc", line 38, in app_init
  File "data\db.pyc", line 35, in init
  File "storm\database.pyc", line 406, in create_database
ImportError: No module named databases.sqlite
09:03:17: Debug: ..\..\include\wx/msw/private.h(697): 'UnregisterClass' failed w
ith error 0x00000584 (class still has open windows.).

Anyway, the error is "ImportError: No module named databases.sqlite".
I haven't been able to google for an answer. I tried copying the
dabases folder from the storm python egg in my application dir to no
avail, also add sqlite3.dll did not work. What should I do to make my
app run stand alone with Storm?

this is my setup.py in case something might be missing:

setup( console = [ { "script": "airs.py" } ]
      ,data_files=["setup\\dll\\msvcp71.dll"],
(Continue reading)

James Henstridge | 9 Apr 2008 09:47
Picon
Gravatar

Re: py2exe problems

On 09/04/2008, Jorgen Bodde <jorgen.maillist@...> wrote:
> Hi everybody,
>
>  I would like to distribute my wxPython app using Storm as executable.
>  I use py2exe for that, but the following error (after creating the
>  exe) puzzles me:
>
>  D:\personal\src\airs\dist>airs.exe
>  Traceback (most recent call last):
>   File "airs.py", line 22, in ?
>   File "wx\_core.pyc", line 7836, in __init__
>   File "wx\_core.pyc", line 7433, in _BootstrapApp
>   File "gui\airsApp.pyc", line 21, in OnInit
>   File "gui\AirsFrame.pyc", line 47, in __init__
>   File "data\viewmgr.pyc", line 38, in app_init
>   File "data\db.pyc", line 35, in init
>   File "storm\database.pyc", line 406, in create_database
>  ImportError: No module named databases.sqlite
>  09:03:17: Debug: ..\..\include\wx/msw/private.h(697): 'UnregisterClass' failed w
>  ith error 0x00000584 (class still has open windows.).
>
>  Anyway, the error is "ImportError: No module named databases.sqlite".
>  I haven't been able to google for an answer. I tried copying the
>  dabases folder from the storm python egg in my application dir to no
>  avail, also add sqlite3.dll did not work. What should I do to make my
>  app run stand alone with Storm?
>
>  this is my setup.py in case something might be missing:
>
>  setup( console = [ { "script": "airs.py" } ]
(Continue reading)

Jorgen Bodde | 9 Apr 2008 10:44
Picon

Re: py2exe problems

Hi James,

Thank you for your reply. I did the following:

----
# needed to dynamically find database
from storm.locals import *
import storm.databases.sqlite

setup( console = [ { "script": "airs.py" } ]
      ,data_files=["setup\\dll\\msvcp71.dll"],
    )
-----

But I still get the same error:

  File "storm\database.pyc", line 406, in create_database
ImportError: No module named databases.sqlite

I also noticed the following with py2exe in the log:

The following modules appear to be missing
['chardet', 'cjkcodecs.aliases', 'functools', 'iconv_codec',
'storm.cextensions', 'wx.BitmapFromImage', 'wx.EmptyIcon']

Between there is storm.cextensions. Does that have to do with anything maybe?

Regards,
- Jorgen

(Continue reading)

Jorgen Bodde | 9 Apr 2008 12:05
Picon

Re: py2exe problems

I found it! I had to place

 import storm.databases.sqlite

In my db.py module, which made sure that the proper files were included.

Thanks for the help!
- Jorgen

Jorgen Bodde | 11 Apr 2008 08:41
Picon

execute many?

Hi All,

I'm using storm to great satisfaction. But now that my database needs
to be upgraded, I am wondering if there is a command like execute()
but for multiple insertions. The reason is of course obvious, speed
and not having to comma seperate a list of execute actions which makes
it a bit hard to read and the most important ofcourse is that the
whole query needs to be executed as transaction so that when an update
fails the database is not crippled.

Thanks,
- Jorgen

Gustavo Niemeyer | 11 Apr 2008 15:41
Favicon
Gravatar

Re: execute many?

Hi Jorgen,

> I'm using storm to great satisfaction. But now that my database needs
> to be upgraded, I am wondering if there is a command like execute()
> but for multiple insertions. The reason is of course obvious, speed

executemany isn't yet exposed through the API, and I agree that this is
certainly something we should do as soon as possible.

> and not having to comma seperate a list of execute actions which makes
> it a bit hard to read and the most important ofcourse is that the
> whole query needs to be executed as transaction so that when an update
> fails the database is not crippled.

I don't get the transaction point, though.  Are you somehow unable
to get transactional behavior without it?

--

-- 
Gustavo Niemeyer
http://niemeyer.net

Gustavo Niemeyer | 11 Apr 2008 16:09
Favicon
Gravatar

Re: execute many?


> Unless I am mistaken (it is not documented) the execute method is
> autmatically committed? If not that would be a good thing as the whole
> update process would then be journaled and not stored.

Statements run with execute() are inside the same transaction as every
other action done by the ORM-specific portions.

--

-- 
Gustavo Niemeyer
http://niemeyer.net

James Henstridge | 14 Apr 2008 11:05
Picon
Gravatar

Re: execute many?

On 11/04/2008, Gustavo Niemeyer <gustavo@...> wrote:
>
>  > Unless I am mistaken (it is not documented) the execute method is
>  > autmatically committed? If not that would be a good thing as the whole
>  > update process would then be journaled and not stored.
>
>  Statements run with execute() are inside the same transaction as every
>  other action done by the ORM-specific portions.

It is also worth noting that for PostgreSQL and MySQL, executemany()
effectively just calls execute() multiple times.

You should definitely only think of it as a performance improvement
rather than something to give you additional transactional integrity.

James.


Gmane