Deploying project to web failed (cocos run -p web)

C:\Project\HelloJS>cocos run -p web
Runing command: compile
Building mode: debug
Runing command: deploy
Deploying mode: debug
Runing command: run
starting application
Traceback (most recent call last):
  File "C:\Project\cocos2d-js-v3.0-beta\tools\cocos2d-console\bin\/coco
s.py", line 482, in <module>
    run_plugin(command, argv, plugins)
  File "C:\Project\cocos2d-js-v3.0-beta\tools\cocos2d-console\bin\/coco
s.py", line 449, in run_plugin
    plugin.run(argv, dependencies_objects)
  File "C:\Project\cocos2d-js-v3.0-beta\tools\cocos2d-console\bin\..\pl
ugins\project_run\project_run.py", line 143, in run
    self.run_web(dependencies)
  File "C:\Project\cocos2d-js-v3.0-beta\tools\cocos2d-console\bin\..\pl
ugins\project_run\project_run.py", line 90, in run_web
    from SimpleHTTPServer import SimpleHTTPRequestHandler
  File "C:\Python27\lib\SimpleHTTPServer.py", line 27, in <module>
    class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
  File "C:\Python27\lib\SimpleHTTPServer.py", line 214, in SimpleHTTPRequestHand
ler
    mimetypes.init() # try to read system mime.types
  File "C:\Python27\lib\mimetypes.py", line 348, in init
    db.read_windows_registry()
  File "C:\Python27\lib\mimetypes.py", line 256, in read_windows_registry
    with _winreg.OpenKey(hkcr, subkeyname) as subkey:
WindowsError: [Error 2]
C:\Project\HelloJS>

Win7 32bit, Chrome

What’s the matter?

1 Like

How to deploy a project to web in Win7 and avoid above error?

If I’m not looking at this wrong, it seems the compilation went ok, but the python script can’t start the web server. I’d try re-installing python?

Since compile is ok, what do I upload to web sever? The whole project foler? Or Is there any reduced content for deploying?

Sorry for the delay, I hadn’t seen your reply!

Yes, if compilation went ok, you should see a new folder in your project with the compiled files for the platform you chose on the command profile.

It seems to be an issue of python, you can try to update it to newest version of 2.7

http://bugs.python.org/issue21871