#1
|
|||
|
|||
Publishing Error
When I run my script using the Vizard 4.0 Enterprise console, I do not get any errors, but when I compile and publish the script to an EXE file and run the script it shuts down without any warning.
I researched it a bit and found the exact line that is causing this problem: import datetime open_date = datetime.datetime.strptime("2012-04-04", "%Y-%M-%d").date() Does anyone have any idea why this line would work in the Vizard console but not in my published exe file? Thanks, Chris |
#2
|
|||
|
|||
I'm not sure why that line would cause an error. I just tried publishing the following script to an EXE and it worked fine on my machine:
Code:
import viz viz.go() import datetime open_date = datetime.datetime.strptime("2012-04-04", "%Y-%M-%d").date() viz.add('gallery.osgb') |
#3
|
|||
|
|||
That script works fine when I run in the console and when I compile it.
I kept trying to comment out different lines in my script to see what was causing the problem and eventually when I commented out only that line the executable script started to work. I also placed pop-ups before and after that line and the software exited before it reached the second pop-up. Could the problem be that this specific line of code is not run until the second time a user opens the software (the import statement is at the top of my code, so I know that datetime is imported)? I know this is a vague question because you don't exactly know any other features of my script, so to be more general is there a way to debug a script to test if it will work when compiled as an executable? I have also had this problem before with a Matplotlib toolbar for wx that loaded fine when I was working in the console and then failed to work when I compiled the script. Thanks |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Polhemus Liberty Latus error | VIZUNN | Vizard | 2 | 02-07-2013 07:13 AM |
ERROR: Failed to load .ive file | turgutm | Vizard | 1 | 09-16-2010 05:16 AM |
5DT glove ultra error 5dt.dls failed | kabk | Vizard | 2 | 05-05-2009 12:43 PM |
Loading morph mesh error. | vEsotu | Vizard | 2 | 03-14-2009 06:29 PM |
The error window that couldn't | FlyingWren | Vizard | 2 | 12-02-2003 08:23 AM |