ORM Lite source?

ORM Lite source?

Hi. Where can I find the source for ORM Lite? All I see is Windows packages on the library section although the notes say it runs on Linux and MacOS as well.
I thought I had found the source code repository on SourceForge, but it looks like that's a different project.

Re: ORM Lite source?

It's my (possibly incorrect) understanding that since ORM Lite is written in Python, it is Python itself that provides the multi-platform capability rather than there being a separate version for each platform. True or False?

Also, are you saying that you have been able to look at the source code for ORM Lite? (e.g. from the 13.b download in the library)

Re: ORM Lite source?

It's my (possibly incorrect) understanding that since ORM Lite is written in Python, it is Python itself that provides the multi-platform capability rather than there being a separate version for each platform. True or False?

Thank you.

Yes, that's what I expected; I had expected a single package that would run wherever a python interpreter + required modules would run. But that's what threw me, since the packages are labeled for Windows and appear to just contain a Windows executable:

I use Python 2.7 in development, but it might work with an earlier version. It requires a recent version of wxPython.

I have received a report that there is an error when run under at least one version of Linux. The person who reported the error was not technical and was not able to identify exactly what was wrong or how to fix it. I have not been able to test this as I don't have a version of Linux available to me.

If you run into the same problem please let me know.

As a work around, because ORM-Lite shares source code with GanttPV, she was able to create ORM diagrams using GanttPV after running the "Object Role Modling -> Install ORM Diagram" script and then adding an ORM Diagram report.

I have tested ORM-Lite on the Macintosh. It has a problem displaying all of the help text, but otherwise seems to be working properly.

There are some developer hints that you might find useful on the GanttPV web site that also apply to ORM-Lite at http:/pureviolet.net/ganttpv/developer/subversion/

Re: ORM Lite source?

ORM-Lite has multi-platform capability because I developed it using Python and wxPython (a cross platform user interface library). Unfortunately, as good as wxPython is, there are some differences between the MW Windows, Linux, and Macintosh platforms. It is necessary to test and make (usually minor) changes for each platform. The most common problem is that the default font size are different on each platform. Sometimes an option on one platform isn't supported on another.

For the Linux version of ORM-Lite, I suspect that I have been using an option or parameter on the Windows version that isn't supported in Linux.

I intend to create a prepackaged version of ORM-Lite for the Macintosh. I would also create one for the common Linux distributions, but it requires specific skills and developer permissions that I don't have to add an application to the Linux program repositories.

The main problem was around line 1433. For some reason, under Linux, ItemHasChildren() is returning true even when GetFirstChild() is ! IsOk().
I added an IsOk() check and that fixed the seg fault. No idea if that's the proper fix or not.

The other issue I think is probably due to my having an older wx library. My library had no definition for aui.AUI_MINIMIZE_POS_TOOLBAR, so
commented out that section. I may just need to upgrade, but maybe it would be good to support older versions where possible? Dunno if that's a critical feature or not.

Re: ORM Lite source?

This error might be caused by ORM-Lite not knowing where to find the Scripts folder. It is the only reason I could think of for ReportType being a NoneType object.

Could you test this work around? (1) After you start ORM-Lite and before you do anything else, select the menu command "Scripts -> Choose Scripts Folder ..." then tell ORM-Lite where you placed the scripts folder. (2) Exit the program and start it up again. (3) Then try double-clicking an ORM diagram to open it. ORM-Lite should save the Scripts location into an options file and reuse that location upon start up.

In the installer for the Windows version of ORM-Lite, I can place the Scripts folder where ORM-Lite expects to find it. I'm not sure where the Linux version of ORM-Lite would expect to find the folder.

JayD239:

This patch also allowed my to run the application

This is good news. Thank you for your efforts.

JayD239:

So I suppose it'll take a bit more effort to have this application properly OS-Independent.

Re: ORM Lite source?

reportobj appears to be a "NoneType" object and fails when it attempts to call reportobj.ReportType.PanelType

maubrey:

Brian, any tips for additional debugging?

Every Report object should know its ReportType. The ReportType is what identifies that particular report as being an ORM Diagram. Without a type it is just a mystery diagram that ORM-Lite doesn't expect.

ORM-Lite is supposed to find the definition of the ORM Diagram ReportType in a script that it automatically applies whenever it creates a new ORM file. The script could be manually applied to a file if necessary; it is the "Install ORM Diagram" script. The script also defines several other ORM related report types.

Re: ORM Lite source?

Again, not sure if it's the correct fix. I saw where Data.Path was being set in ORMLite.py, and AFAICT it's supposed to be set to the directory containing the script. With the directory layout in svn, Scripts and ormlite are at the same level, so I just changed GetScriptDirectory() to return ../Scripts rather the Scripts. I verified that it works for me whether I run it from the parent directory or within the ormlite/.

I also modified GetScriptDirectory() to emit a warning if the path doesn't exist. Currently it only emits that in debug mode... not sure the best way to handle it but it would be nice to raise an exception or something if the Scripts/ directory isn't found, since that seems like a fatal error.

Best,

Maurice

BTW, where can I find the message syntax for this forum? I'm currently using HTML to structure messages but wondering if it supports bbcode or markdown or somesuch?