Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

[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

— asked July 4th 2010 by Vivien Brissat
  • 1.3.2
  • bug
  • module
  • sdk
0 Comments

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 ^^""

    — answered July 5th 2010 by Vivien Brissat
    permalink
    0 Comments
  • checking the status of this issue… I am having a similar problem. any progress?

    — answered July 10th 2010 by vincent youmans
    permalink
    0 Comments
  • No response for the moment, i made a ticket here

    — answered July 11th 2010 by Vivien Brissat
    permalink
    0 Comments
  • 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)
    
    — answered July 24th 2010 by Dayeh Chen
    permalink
    0 Comments
  • 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)
    
    — answered July 24th 2010 by Dayeh Chen
    permalink
    1 Comment
    • To my earlier workaround post:
      For those projects have been created, you need to modify those 'build.py' under those project directory as well.

      — commented July 31st 2010 by Dayeh Chen
  • Thank you for your response, i will try this fix ;)

    — answered July 26th 2010 by Vivien Brissat
    permalink
    0 Comments
  • just checking to see if there is anything new since the new iOS 1.4 was released.

    — answered July 29th 2010 by vincent youmans
    permalink
    0 Comments
  • just checking to see if there is anything new since the new iOS 1.4 was released.

    — answered July 29th 2010 by vincent youmans
    permalink
    0 Comments
  • just checking to see if there is anything new since the new iOS 1.4 was released.

    — answered July 29th 2010 by vincent youmans
    permalink
    0 Comments
  • just checking to see if there is anything new since the new iOS 1.4 was released.

    — answered July 29th 2010 by vincent youmans
    permalink
    0 Comments
  • Do you have any documentation on how ot do this?

    — answered July 29th 2010 by Peter Lum
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.