Frage

I already has gitbash on windows 7.

I installed Python, also added Environment path to C:/python33

After cloning limejs. When type the 3rd step from limejs basics. https://github.com/digitalfruit/limejs

I get following error.

Welcome to Git (version 1.8.3-preview20130601)


Run 'git help git' to display the help index.
Run 'git help <command>' to display help for specific commands.

lenovo@BMI-AJINKYA /d/limejs (master)
$ python --version
Python 3.3.2

lenovo@BMI-AJINKYA /d/limejs (master)
$ python bin/lime.py --help
Usage: lime.py [command] [options]
Commands:
    init            Check lime dependecies and setup if needed
    update          Update Closure dependency file. Need to run every time you
                    change goog.provide() or goog.require()
    create [path/name]   Setup new project [name]
    gensoy [path]   Convert all *.soy files under path to *.soy.js files
    build [name]    Compile project to single Javascript file

Options:
  -h, --help            show this help message and exit
  -a, --advanced        Build uses ADVANCED_OPTIMIZATIONS mode (encouraged)
  -e EXTERNS_FILE, --externs=EXTERNS_FILE
                        File with externs declarations.
  -o OUTPUT, --output=OUTPUT
                        Output file for build result
  -m, --map             Build result sourcemap for debugging. Also turns on
                        pretty print.
  -s, --use-strict      Use EcmaScript5 strict mode.
  -p PRELOAD, --preload=PRELOAD
                        Generate preloader code with given callback as start
                        point.
  -d DEFINE, --define=DEFINE
                        Define custom variable accessible before build.

lenovo@BMI-AJINKYA /d/limejs (master)
$ bin/lime.py init
Closure Library not found. Downloading to D:\limejs\closure
Please wait...
Cloning into 'D:\limejs\closure'...
remote: Counting objects: 43590, done.
remote: Finding sources: 100% (43590/43590), done.
remote: Total 43590 (delta 35039)
Receiving objects: 100% (43590/43590), 17.23 MiB | 265.00 KiB/s, done.
Resolving deltas: 100% (35039/35039), done.
Checking out files: 100% (1884/1884), done.
Box2DJS not found. Downloading to D:\limejs\box2d
Please wait...
Cloning into 'D:\limejs\box2d'...
remote: Counting objects: 2250, done.
remote: Compressing objects: 100% (1172/1172), done.
emote: Total 2250 (delta 1092), reused 2222 (delta 1065)
Receiving objects: 100% (2250/2250), 1.01 MiB | 268.00 KiB/s, done.
Resolving deltas: 100% (1092/1092), done.
Downloading Closure Compiler:
100%
Unzipping...
Cleanup
Downloading Closure Templates(Soy):
100%
Unzipping...
Cleanup
Updating Closure deps file
python D:\limejs\closure\closure/bin/build/depswriter.py --root_with_prefix="D:\
limejs\closure/ ../../" --root_with_prefix="D:\limejs\lime/ ../../../lime/" --ro
ot_with_prefix="D:\limejs\box2d/src/ ../../../box2d/src/" --output_file="D:\lime
js\closure\closure/goog/deps.js"
Traceback (most recent call last):
  File "D:\limejs\closure\closure/bin/build/depswriter.py", line 202, in <module
>
    main()
  File "D:\limejs\closure\closure/bin/build/depswriter.py", line 178, in main
    path_to_source.update(_GetRelativePathToSourceDict(root, prefix=prefix))
  File "D:\limejs\closure\closure/bin/build/depswriter.py", line 145, in _GetRel
ativePathToSourceDict
    path_to_source[prefixed_path] = source.Source(source.GetFileContents(path))
  File "D:\limejs\closure\closure\bin\build\source.py", line 119, in GetFileCont
ents
    return fileobj.read()
  File "c:\Python33\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 7027: cha
racter maps to <undefined>

lenovo@BMI-AJINKYA /d/limejs (master)
$
War es hilfreich?

Lösung

I fixed it. I uninstall Python 3.3 and installed Python 2.7.

Problem was Python 3.x decodes text files automatically to Unicode using system's default encoding, which may be causing the error.

Installing Python 2.7, i get no compiling errors as well limejs helloworld example works fine now.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top