WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 04-04-2012, 12:52 PM
hotshotiguana hotshotiguana is offline
Join Date: Mar 2011
Posts: 22
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?

Reply With Quote
Old 04-04-2012, 04:40 PM
farshizzo farshizzo is offline
WorldViz Team Member
Join Date: Mar 2003
Posts: 2,849
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:
import viz

import datetime
open_date = datetime.datetime.strptime("2012-04-04", "%Y-%M-%d").date()

Does this script work for you? How did you determine that line was causing the error?
Reply With Quote
Old 04-04-2012, 05:02 PM
hotshotiguana hotshotiguana is offline
Join Date: Mar 2011
Posts: 22
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.

Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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

All times are GMT -7. The time now is 03:42 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC