On 10/1/10 8:14 AM, Jeff Johnson wrote:
>
> On 10/01/2010 07:48 AM, Jeff Johnson wrote:
>> On 10/01/2010 07:13 AM, Jeff Johnson wrote:
>>
>>> I'm so close I can taste it! I get the following traceback when running
>>> the exe:
>>>
>>> 2010-10-01 07:07:44 - ERROR -
>>> No translation file found for domain 'dabo'.
>>> Locale dir = C:\PYTHON~1\jp\soc\dist\library.zip\dabo\locale
>>> Languages = ['en_US']
>>> Codeset = cp1252
>>> 2010-10-01 07:07:56 - ERROR - Could not bind to 'socsets.ssurl'
>>> Reason: 'NoneType' object has no attribute 'ssurl'
>>>
>>> I was able to troubleshoot everything else, but I am stumped on this one.
>>>
>>>
>>>
>> Ok. socsets.ssurl is a table in my sqlite database. The database is in
>> the same folder as the .exe and running the exe does not recognize the
>> database. It works fine from the .py file.
>>
>>
>> Jeff
>>
>> -------------------
>>
>> Jeff Johnson
>> [email protected]
>>
>>
>>
>
> I took data_files out of my setup.py and put the cnxml and the cdxml in
> the exe folder and it brings up the form but I am still having that
> binding problem. When running the .py the form opens up with the fields
> populated. When running the .exe the fields are not populated and the
> events on the form do not work.
You need to get an actual traceback to debug what's going on here. I have no
idea who
is trying to bind what, but whoever it is thinks that socsets is a python
object, not
a table in a database.
In your main .py file, make sure you redirect stderr and stdout to a known file
that
you can look at post-mortem. Here's what I do:
22 # If we are running frozen, reroute stdout and stderr:
23 if hasattr(sys, "frozen"):
24 sys.stderr = open(os.path.join(appDataDir, "err.log"), "w")
25 dabo.errorLog.LogObject = sys.stderr
26 sys.stdout = open(os.path.join(appDataDir, "out.log"), "w")
27 dabo.infoLog.LogObject = sys.stdout
appDataDir is the directory to be used for application data (never ever ever
just put
the database in the same directory as the application - it is asking for
different
kinds of trouble on each and every platform). In my case, appDataDir is:
on Windows: %appdata%\Shutter Studio
which usually resolves to c:\Users\<username>\Application Data\Shutter
Studio
on *nix: ~/.sbs_studio
which usually resolves to /home/<username>/.shutter_studio
Here's the code used to get those directories:
15 if test_version:
16 appDataDir = dabo.lib.utils.getUserAppDataDirectory("Shutter Studio
TEST")
17 elif mu_version:
18 appDataDir = dabo.lib.utils.getUserAppDataDirectory("Shutter Studio
Multiuser")
19 else:
20 appDataDir = dabo.lib.utils.getUserAppDataDirectory("Shutter Studio")
You also should deal with the "no translation found for domain dabo", and
you'll
likely find that standard icons aren't found, either. Run AppWizard, and then
review
the setup.py file that is generated. Search for locale and icon-related items.
These
problems have been solved before and the code is there for you to take.
Paul
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]