[bug] Create module on Titanium 1.3.2
Hi,
I want to make a new Module (like in the doc), and have an error message in my console with the file "build.py", when i try to build the module :
build.py", line 89
for dn in ('assets','documentation','example'):
^
IndentationError: unindent does not match any outer indentation level
Think it's a bug, in the source files generated….
Thanks
11 Answers
-
Hummmm i thin k i will reinstall Titanium, since i installed "module.py" for have it in Xcode my compilation in Titanium don't work :
Traceback (most recent call last): File "/Library/Application Support/Titanium/mobilesdk/osx/1.3.2/iphone/builder.py", line 800, in <module> main(sys.argv) File "/Library/Application Support/Titanium/mobilesdk/osx/1.3.2/iphone/builder.py", line 396, in main compiler = Compiler(project_dir,appid,name,deploytype,xcode_build,devicefamily,iphone_version,True) File "/Library/Application Support/Titanium/mobilesdk/osx/1.3.2/iphone/compiler.py", line 133, in __init__ main_file.write(main_template) UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 628: ordinal not in range(128)
I think module factory in SDK 1.3.2 is not enough stable ^^""
-
checking the status of this issue… I am having a similar problem. any progress?
-
No response for the moment, i made a ticket here
-
Because proper indentation is required for delimiting blocks in Python. Some TABs misplaced by SPACEs in 'build.py' caused this problem.
Before the bug gets fixed, you can workaround by properly indent line89,90,91 in file 'build.py' under
/Library/Application Support/Titanium/mobilesdk/osx/(SDK_VERSION)/iphone/xcode/templates/Titanium Mobile Module/
(SDK_VERSION is your SDK number)-- 88 zf.write('build/%s' % libname, '%s/%s' % (modulepath,libname)) 89 for dn in ('assets','documentation','example'): 90 if os.path.exists(dn): 91 zip_dir(zf,dn,'%s/%s' % (modulepath,dn)) 92 zf.write('LICENSE','%s/LICENSE' % modulepath)
To
-- 88 zf.write('build/%s' % libname, '%s/%s' % (modulepath,libname)) 89 for dn in ('assets','documentation','example'): 90 if os.path.exists(dn): 91 zip_dir(zf,dn,'%s/%s' % (modulepath,dn)) 92 zf.write('LICENSE','%s/LICENSE' % modulepath)
-
Update: the 'build.py' is under your project directory for existing projects. You need to modify those, too.
Because proper indentation is required for delimiting blocks in Python. Some TABs misplaced by SPACEs in 'build.py' caused this problem.
Before the bug gets fixed, you can workaround by properly indent line89,90,91 in file 'build.py' under
/Library/Application Support/Titanium/mobilesdk/osx/(SDK_VERSION)/iphone/xcode/templates/Titanium Mobile Module/
(SDK_VERSION is your SDK number)-- 88 zf.write('build/%s' % libname, '%s/%s' % (modulepath,libname)) 89 for dn in ('assets','documentation','example'): 90 if os.path.exists(dn): 91 zip_dir(zf,dn,'%s/%s' % (modulepath,dn)) 92 zf.write('LICENSE','%s/LICENSE' % modulepath)
To
-- 88 zf.write('build/%s' % libname, '%s/%s' % (modulepath,libname)) 89 for dn in ('assets','documentation','example'): 90 if os.path.exists(dn): 91 zip_dir(zf,dn,'%s/%s' % (modulepath,dn)) 92 zf.write('LICENSE','%s/LICENSE' % modulepath)
-
Thank you for your response, i will try this fix ;)
-
just checking to see if there is anything new since the new iOS 1.4 was released.
-
just checking to see if there is anything new since the new iOS 1.4 was released.
-
just checking to see if there is anything new since the new iOS 1.4 was released.
-
just checking to see if there is anything new since the new iOS 1.4 was released.
-
Do you have any documentation on how ot do this?