radiasoft / sirepo

Sirepo is a framework for scientific cloud computing. Try it out!
https://sirepo.com
Apache License 2.0
64 stars 32 forks source link

Error for a new user/browser #322

Closed mrakitin closed 8 years ago

mrakitin commented 8 years ago

With the recent version of sirepo (41daad17f6b89a19d569b687cc576c2ea93803b7) I get the following error when I go to the examples:

Traceback (most recent call last):
  File "/home/vagrant/.pyenv/versions/2.7.10/lib/python2.7/site-packages/flask/app.py", line 2000, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/vagrant/.pyenv/versions/2.7.10/lib/python2.7/site-packages/beaker/middleware.py", line 155, in __call__
    return self.wrap_app(environ, session_start_response)
  File "/home/vagrant/.pyenv/versions/2.7.10/lib/python2.7/site-packages/flask/app.py", line 1991, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/home/vagrant/.pyenv/versions/2.7.10/lib/python2.7/site-packages/flask/app.py", line 1567, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/vagrant/.pyenv/versions/2.7.10/lib/python2.7/site-packages/flask/app.py", line 1988, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/vagrant/.pyenv/versions/2.7.10/lib/python2.7/site-packages/flask/app.py", line 1641, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/vagrant/.pyenv/versions/2.7.10/lib/python2.7/site-packages/flask/app.py", line 1544, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/vagrant/.pyenv/versions/2.7.10/lib/python2.7/site-packages/flask/app.py", line 1639, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/vagrant/.pyenv/versions/2.7.10/lib/python2.7/site-packages/flask/app.py", line 1625, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/vagrant/src/radiasoft/sirepo/sirepo/server.py", line 259, in app_find_by_name
    'simulation.name': simulation_name,
  File "/home/vagrant/src/radiasoft/sirepo/sirepo/simulation_db.py", line 192, in iterate_simulation_datafiles
    str(simulation_dir(simulation_type).join('*', SIMULATION_DATA_FILE)),
  File "/home/vagrant/src/radiasoft/sirepo/sirepo/simulation_db.py", line 424, in simulation_dir
    d = _user_dir().join(simulation_type)
  File "/home/vagrant/src/radiasoft/sirepo/sirepo/simulation_db.py", line 621, in _user_dir
    uid = _user_dir_create()
  File "/home/vagrant/src/radiasoft/sirepo/sirepo/simulation_db.py", line 640, in _user_dir_create
    _create_example_and_lib_files(simulation_type)
  File "/home/vagrant/src/radiasoft/sirepo/sirepo/simulation_db.py", line 530, in _create_example_and_lib_files
    save_new_example(simulation_type, s)
  File "/home/vagrant/src/radiasoft/sirepo/sirepo/simulation_db.py", line 400, in save_new_example
    return save_new_simulation(simulation_type, data)
  File "/home/vagrant/src/radiasoft/sirepo/sirepo/simulation_db.py", line 406, in save_new_simulation
    save_simulation_json(simulation_type, data)
  File "/home/vagrant/src/radiasoft/sirepo/sirepo/simulation_db.py", line 414, in save_simulation_json
    write_json(_simulation_data_file(simulation_type, sid), data)
  File "/home/vagrant/src/radiasoft/sirepo/sirepo/simulation_db.py", line 493, in write_json
    with open(str(json_filename(filename)), 'w') as f:
IOError: [Errno 2] No such file or directory: '/home/vagrant/src/radiasoft/sirepo/run/user/So68NHXN/srw/l6y1Jbkp/sirepo-data.json'
10.0.2.2 - - [25/Aug/2016 22:20:16] "GET /find-by-name/srw/calculator/Undulator%20Radiation?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 200 -
10.0.2.2 - - [25/Aug/2016 22:20:16] "GET /find-by-name/srw/calculator/Undulator%20Radiation?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 -
10.0.2.2 - - [25/Aug/2016 22:20:16] "GET /find-by-name/srw/calculator/Undulator%20Radiation?__debugger__=yes&cmd=resource&f=jquery.js HTTP/1.1" 200 -
10.0.2.2 - - [25/Aug/2016 22:20:17] "GET /find-by-name/srw/calculator/Undulator%20Radiation?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 -
10.0.2.2 - - [25/Aug/2016 22:20:17] "GET /find-by-name/srw/calculator/Undulator%20Radiation?__debugger__=yes&cmd=resource&f=ubuntu.ttf HTTP/1.1" 200 -
10.0.2.2 - - [25/Aug/2016 22:20:17] "GET /find-by-name/srw/calculator/Undulator%20Radiation?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 -

When I go to the expert mode page, there are no simulations at all, server log contains:

IOError: [Errno 2] No such file or directory: '/home/vagrant/src/radiasoft/sirepo/run/user/5tz4kqqJ/srw/l6y1Jbkp/sirepo-data.json'
../sirepo/server.py:199:app_error_logging 10.0.2.2: javascript error: {
    "cause": "",
    "message": "TypeError: 'log' called on an object that does not implement interface Console.",
    "stackTrace": [
        "logError@http://localhost:8000/static/js/sirepo.js?20160825.222451:661:9",
        "self.sendRequest/<@http://localhost:8000/static/js/sirepo.js?20160825.222451:767:17",
        "k/g.error/<@http://localhost:8000/static/js/ext/angular-1.4.2.min.js:87:31",
        "f/<@http://localhost:8000/static/js/ext/angular-1.4.2.min.js:120:182",
        "jf/this.$get</n.prototype.$eval@http://localhost:8000/static/js/ext/angular-1.4.2.min.js:134:489",
        "jf/this.$get</n.prototype.$digest@http://localhost:8000/static/js/ext/angular-1.4.2.min.js:132:1",
        "jf/this.$get</n.prototype.$apply@http://localhost:8000/static/js/ext/angular-1.4.2.min.js:135:267",
        "l@http://localhost:8000/static/js/ext/angular-1.4.2.min.js:87:232",
        "F@http://localhost:8000/static/js/ext/angular-1.4.2.min.js:91:277",
        "Tf/</K.onload@http://localhost:8000/static/js/ext/angular-1.4.2.min.js:92:315"
    ],
    "type": "exception",
    "url": "http://localhost:8000/srw#/simulations"
}
mrakitin commented 8 years ago

Rob, could you please have a look at it?

robnagler commented 8 years ago

Just landed. I'll check tomorrow.

mrakitin commented 8 years ago

Numpy 1.9.3 causes the error:

    ImportError: numpy.core.multiarray failed to import

Removed this version of numpy and installed numpy-1.11.1, which solved the problem. The issue will be solved in #313, closing.

robnagler commented 8 years ago

I think this doesn't work. See radiasoft/containers#30. It does fix the install issue, but I don't think Warp runs. Perhaps the latest Warp does. You should be able to install with 1.9.3.

robnagler commented 8 years ago

Fix radiasoft/sirepo@7fbb55a

mrakitin commented 8 years ago

Here is the file which I saw the error with: nsls-ii-esm-beamline-tab.json.txt