Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sporadic Build Failure on Win32 #19

Closed
mindw opened this issue Dec 3, 2011 · 2 comments
Closed

Sporadic Build Failure on Win32 #19

mindw opened this issue Dec 3, 2011 · 2 comments

Comments

@mindw
Copy link
Contributor

mindw commented Dec 3, 2011

The following error shows up when building mayai2 on windows.

running build
----------------------------------------------------------------------
Building TVTK classes... SyntaxError: ('invalid syntax', ('tvtk_classes\\ls_dyna_reader.py', 100, 11, '        Get/Set the directory containing the LS-Dyna database and determine\n'))

error: tvtk_classes\ls_dyna_reader.pyc: The system cannot find the file specified

I've tracked down the issue to an uninitialized variable, and the following fixes this:

@mindw
Copy link
Contributor Author

mindw commented Dec 3, 2011

The patch in readable form!

diff --git a/tvtk/wrapper_gen.py b/tvtk/wrapper_gen.py
index 29bd1df..b13c607 100644
--- a/tvtk/wrapper_gen.py
+++ b/tvtk/wrapper_gen.py
@@ -520,7 +520,9 @@ class WrapperGenerator:
                 elif typ in types.StringTypes:
                     if '\n' in default or '\r' in default:
                         default = clean_special_chars(default)
-
+                    if name == 'database_directory':
+                        default = ''
+                    
                     if default == '\x00':
                         default = ''
                         t_def = 'traits.String("%(default)s", '%locals() 

@mindw mindw closed this as completed Dec 3, 2011
@mindw mindw reopened this Dec 3, 2011
@stefanoborini
Copy link
Contributor

Closing. This is apparently fixed in a similar way. The default variable is now guaranteed to be defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants