GithubHelp home page GithubHelp logo

jupyter-openmodelica's Introduction

OpenModelica License: OSMC-PL

OpenModelica is an open-source Modelica-based modeling and simulation environment intended for industrial and academic usage.

OpenModelica User's Guide

The User's Guide is automatically generated from the documentation repository.

OpenModelica environment

The OpenModelica Compiler is the core of the OpenModelica project. OMEdit is the graphical user interface on top of the compiler. OMSimulator is a capable FMI and SSP-based Co-Simulation environment, available as a standalone version or integrated in OMEdit. In addition there are interactive environments OMNotebook, OMPlot and OMShell interaction with the OMCompiler as well as various other tools: OMOptim, OMParser, OMSens, OMSense_Qt.

Working with the repository

OpenModelica.git is a superproject. Clone the project using one of:

# Faster pulling by using openmodelica.org read-only mirror (low latency in Europe; very important when updating all submodules)
# Replace the openmodelica.org pull URL with https://github.com/OpenModelica/OpenModelica.git if you want to pull directly from github
# The default choice is to push to your fork on github.com (SSH). Replace MY_FORK with OpenModelica to push directly to the OpenModelica repositories (if you have access)
MY_FORK=<MyGitHubUserName>
git clone --recurse-submodules https://openmodelica.org/git-readonly/OpenModelica.git
cd OpenModelica
git remote set-url --push origin [email protected]:$MY_FORK/OpenModelica.git
git submodule foreach --recursive 'git remote set-url --push origin `git config --get remote.origin.url | sed s,^.*/,[email protected]:'$MY_FORK'/,`'

If you are a developer and want to update your local git repository to the latest developments or latest heads, use:

# After cloning
cd OpenModelica
git checkout master
git pull
# To checkout the latest master on each submodule run
# you will need to merge each submodule, but your changes will remain
git submodule foreach --recursive "git checkout master && git pull"

# Running master on all submodules might lead to build errors
# so use this to make sure you force all submodules to the commits
# from the OpenModelica glue project which are properly tested
git submodule update --force --init --recursive

In order to push to the repository, you will push to your own fork of OpenModelica.git, etc. You will need to create a fork of each repository that you want to push to (by clicking the Fork button in the GitHub web interface).

If you do not checkout the repositories for some GUI clients (such as OMOptim.git), these directories will be ignored by autoconf and skipped during compilation.

To checkout a specific version of OpenModelica, say tag v1.16.2 do:

git clone --recurse-submodules https://github.com/OpenModelica/OpenModelica.git
cd OpenModelica
git checkout v1.16.2
git submodule update --force --init --recursive

If you have issues building you can try to clean and reset the repository using:

git clean -fdx
git submodule foreach --recursive git clean -fdx
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive

To check your working copy status and the hashes of the submodules, use:

git status
git submodule status --recursive

To checkout a minimal version of OpenModelica

git clone https://openmodelica.org/git-readonly/OpenModelica.git OpenModelica-minimal
cd OpenModelica-minimal
git submodule update --init --recursive libraries

Build OpenModelica

We automatically generate nightly builds for Windows and for various flavours of Linux. You can download and install them directly if you just want to run the latest development version of OpenModelica without the effort of compiling the sources yourself.

How to run

Here is a short example session. This example uses OMShell-terminal, but OMShell, mos-scripts, or OMNotebook work the same way.

$ cd trunk/build/bin
$ ./OMShell-terminal
OMShell Copyright 1997-2015, Open Source Modelica Consortium (OSMC)
Distributed under OMSC-PL and GPL, see www.openmodelica.org

To get help on using OMShell and OpenModelica, type "help()" and press enter
Started server using:omc -d=interactive > /tmp/omshell.log 2>&1 &
>>> loadModel(Modelica)
true
>>> getErrorString()
""
>> instantiateModel(Modelica.Electrical.Analog.Basic.Resistor)
"class Modelica.Electrical.Analog.Basic.Resistor \"Ideal linear electrical resistor\"
  Real v(quantity = \"ElectricPotential\", unit = \"V\") \"Voltage drop between the two pins (= p.v - n.v)\";
  Real i(quantity = \"ElectricCurrent\", unit = \"A\") \"Current flowing from pin p to pin n\";
  Real p.v(quantity = \"ElectricPotential\", unit = \"V\") \"Potential at the pin\";
  Real p.i(quantity = \"ElectricCurrent\", unit = \"A\") \"Current flowing into the pin\";
  Real n.v(quantity = \"ElectricPotential\", unit = \"V\") \"Potential at the pin\";
  Real n.i(quantity = \"ElectricCurrent\", unit = \"A\") \"Current flowing into the pin\";
  parameter Boolean useHeatPort = false \"=true, if HeatPort is enabled\";
  parameter Real T(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 0.0, start = 288.15, nominal = 300.0) = T_ref \"Fixed device temperature if useHeatPort = false\";
  Real LossPower(quantity = \"Power\", unit = \"W\") \"Loss power leaving component via HeatPort\";
  Real T_heatPort(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 0.0, start = 288.15, nominal = 300.0) \"Temperature of HeatPort\";
  parameter Real R(quantity = \"Resistance\", unit = \"Ohm\", start = 1.0) \"Resistance at temperature T_ref\";
  parameter Real T_ref(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 0.0, start = 288.15, nominal = 300.0) = 300.15 \"Reference temperature\";
  parameter Real alpha(quantity = \"LinearTemperatureCoefficient\", unit = \"1/K\") = 0.0 \"Temperature coefficient of resistance (R_actual = R*(1 + alpha*(T_heatPort - T_ref))\";
  Real R_actual(quantity = \"Resistance\", unit = \"Ohm\") \"Actual resistance = R*(1 + alpha*(T_heatPort - T_ref))\";
equation
  assert(1.0 + alpha * (T_heatPort - T_ref) >= 1e-15, \"Temperature outside scope of model!\");
  R_actual = R * (1.0 + alpha * (T_heatPort - T_ref));
  v = R_actual * i;
  LossPower = v * i;
  v = p.v - n.v;
  0.0 = p.i + n.i;
  i = p.i;
  T_heatPort = T;
  p.i = 0.0;
  n.i = 0.0;
end Modelica.Electrical.Analog.Basic.Resistor;
"
>> a:=1:5;
>> b:=3:8
{3,4,5,6,7,8}
>>> a*b

>>> getErrorString()
"[<interactive>:1:1-1:0:writable] Error: Incompatible argument types to operation scalar product in component <NO COMPONENT>, left type: Integer[5], right type: Integer[6]
[<interactive>:1:1-1:0:writable] Error: Incompatible argument types to operation scalar product in component <NO COMPONENT>, left type: Real[5], right type: Real[6]
[<interactive>:1:1-1:0:writable] Error: Cannot resolve type of expression a * b. The operands have types Integer[5], Integer[6] in component <NO COMPONENT>.
"
>> b:=3:7;
>> a*b
85
>>> listVariables()
{b, a}
>>

How to contribute to the OpenModelica Compiler

The long-term development of OpenModelica is supported by a non-profit organization - the Open Source Modelica Consortium (OSMC).

See CONTRIBUTING.md on how to contribute to the development. If you encounter any bugs, feel free to open a ticket about it. For general questions regarding OpenModelica there is a discussions section available.

License

See OSMC-License.txt.

How to cite

See the CITATIONS file for information on how to cite OpenModelica in any publications reporting work done using OpenModelica. For a complete list of all publications related to OpenModelica see doc/bibliography/openmodelica.bib.


Last updated: 2023-06-21

jupyter-openmodelica's People

Contributors

adeas31 avatar arun3688 avatar danachee avatar hkiel avatar techdragon avatar thorade avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jupyter-openmodelica's Issues

plot in jupyter-lab

Example works in Jupyter notebook ("plot" displays results of simulation), but does not display anything for Jupyter Lab.

Help with installation in ubuntu 20.04

I can't install jupyter-openmodelica in ubuntu 20.04. The kernel does not appear in the list or in jupyter kernelspec list

  • There is no kernel.json file, which I have used to install other jupyter kernels.
  • You mention that I should set the OPENMODELICAHOME variable, but I don't know what value should it take after an openmodelica installation from the official repositories.

Regards

Syntax Highlighting doesn't work.

The mime type required for codemirror to highlight modelica code is text/x-modelica. The current specified type text/modelica does not get highlighted.

Runtime Interrupted errors.

After "docker run -p 8888:8888 smartkit/jupyter-openmodelica" , some error thrown:

[I 15:07:41.383 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret
[I 15:07:41.772 NotebookApp] Serving notebooks from local directory: /app
[I 15:07:41.773 NotebookApp] 0 active kernels
[I 15:07:41.773 NotebookApp] The Jupyter Notebook is running at:
[I 15:07:41.773 NotebookApp] http://0.0.0.0:8888/?token=14651ec082339e69f25cf94e5f1878df28f8e4d3325cfe53
[I 15:07:41.773 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 15:07:41.774 NotebookApp] No web browser found: could not locate runnable browser.
[C 15:07:41.774 NotebookApp]

Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
    http://0.0.0.0:8888/?token=14651ec082339e69f25cf94e5f1878df28f8e4d3325cfe53

^C[I 15:08:06.224 NotebookApp] Interrupted...
[I 15:08:06.225 NotebookApp] Shutting down 0 kernels
smartkit@localhost:~/git/jupyter-openmodelica$ docker run -p 8888:8888 smartkit/jupyter-openmodelica
[I 15:08:23.193 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret
[I 15:08:23.583 NotebookApp] Serving notebooks from local directory: /app
[I 15:08:23.583 NotebookApp] 0 active kernels
[I 15:08:23.583 NotebookApp] The Jupyter Notebook is running at:
[I 15:08:23.584 NotebookApp] http://0.0.0.0:8888/?token=2338da0f0e9447049f718506226dfeae85c21983d17ce1a6
[I 15:08:23.584 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 15:08:23.586 NotebookApp] No web browser found: could not locate runnable browser.
[C 15:08:23.587 NotebookApp]

Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
    http://0.0.0.0:8888/?token=2338da0f0e9447049f718506226dfeae85c21983d17ce1a6

[I 15:08:35.889 NotebookApp] 302 GET /?token=2338da0f0e9447049f718506226dfeae85c21983d17ce1a6 (172.17.0.1) 0.86ms
[I 15:08:43.399 NotebookApp] Writing notebook-signing key to /root/.local/share/jupyter/notebook_secret
[W 15:08:43.403 NotebookApp] Notebook OpenModelica.ipynb is not trusted
[W 15:08:43.450 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20171127150823 (172.17.0.1) 14.66ms referer=http://0.0.0.0:8888/notebooks/OpenModelica.ipynb
[I 15:08:43.911 NotebookApp] Kernel started: 820ab535-a82a-42eb-a25c-4d4395c6c59b
[W 15:08:43.922 NotebookApp] 404 GET /static/components/codemirror/mode/openmodelica/openmodelica.js?v=20171127150823 (172.17.0.1) 6.02ms referer=http://0.0.0.0:8888/notebooks/OpenModelica.ipynb
2017-11-27 15:08:47,189 - OMPython - ERROR - OMC Server is down. Please start it! Log-file says:
Error: You are trying to run OpenModelica as a server using the root user.
This is a very bad idea:

  • The socket interface does not authenticate the user.
  • OpenModelica allows execution of arbitrary commands.
    Execution failed!

Traceback (most recent call last):
File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/app/openmodelica_kernel/main.py", line 43, in
IPKernelApp.launch_instance(kernel_class=OpenModelicaKernel)
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 457, in initialize
self.init_kernel()
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 368, in init_kernel
user_ns=self.user_ns,
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/app/openmodelica_kernel/kernel.py", line 125, in init
self.omc=OMCSessionZMQ()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 502, in init
self._connect_to_omc()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 528, in _connect_to_omc
raise Exception
Exception
name 'reload' is not defined
[I 15:08:49.909 NotebookApp] KernelRestarter: restarting kernel (1/5)
2017-11-27 15:08:53,095 - OMPython - ERROR - OMC Server is down. Please start it! Log-file says:
Error: You are trying to run OpenModelica as a server using the root user.
This is a very bad idea:

  • The socket interface does not authenticate the user.
  • OpenModelica allows execution of arbitrary commands.
    Execution failed!

Traceback (most recent call last):
File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/app/openmodelica_kernel/main.py", line 43, in
IPKernelApp.launch_instance(kernel_class=OpenModelicaKernel)
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 457, in initialize
self.init_kernel()
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 368, in init_kernel
user_ns=self.user_ns,
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/app/openmodelica_kernel/kernel.py", line 125, in init
self.omc=OMCSessionZMQ()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 502, in init
self._connect_to_omc()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 528, in _connect_to_omc
raise Exception
Exception
name 'reload' is not defined
[W 15:08:53.948 NotebookApp] Timeout waiting for kernel_info reply from 820ab535-a82a-42eb-a25c-4d4395c6c59b
[I 15:08:55.917 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel 820ab535-a82a-42eb-a25c-4d4395c6c59b restarted
2017-11-27 15:08:59,151 - OMPython - ERROR - OMC Server is down. Please start it! Log-file says:
Error: You are trying to run OpenModelica as a server using the root user.
This is a very bad idea:

  • The socket interface does not authenticate the user.
  • OpenModelica allows execution of arbitrary commands.
    Execution failed!

Traceback (most recent call last):
File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/app/openmodelica_kernel/main.py", line 43, in
IPKernelApp.launch_instance(kernel_class=OpenModelicaKernel)
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 457, in initialize
self.init_kernel()
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 368, in init_kernel
user_ns=self.user_ns,
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/app/openmodelica_kernel/kernel.py", line 125, in init
self.omc=OMCSessionZMQ()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 502, in init
self._connect_to_omc()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 528, in _connect_to_omc
raise Exception
Exception
name 'reload' is not defined
[I 15:09:01.929 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel 820ab535-a82a-42eb-a25c-4d4395c6c59b restarted
2017-11-27 15:09:05,138 - OMPython - ERROR - OMC Server is down. Please start it! Log-file says:
Error: You are trying to run OpenModelica as a server using the root user.
This is a very bad idea:

  • The socket interface does not authenticate the user.
  • OpenModelica allows execution of arbitrary commands.
    Execution failed!

Traceback (most recent call last):
File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/app/openmodelica_kernel/main.py", line 43, in
IPKernelApp.launch_instance(kernel_class=OpenModelicaKernel)
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 457, in initialize
self.init_kernel()
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 368, in init_kernel
user_ns=self.user_ns,
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/app/openmodelica_kernel/kernel.py", line 125, in init
self.omc=OMCSessionZMQ()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 502, in init
self._connect_to_omc()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 528, in _connect_to_omc
raise Exception
Exception
name 'reload' is not defined
[I 15:09:07.940 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel 820ab535-a82a-42eb-a25c-4d4395c6c59b restarted
2017-11-27 15:09:11,188 - OMPython - ERROR - OMC Server is down. Please start it! Log-file says:
Error: You are trying to run OpenModelica as a server using the root user.
This is a very bad idea:

  • The socket interface does not authenticate the user.
  • OpenModelica allows execution of arbitrary commands.
    Execution failed!

Traceback (most recent call last):
File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/app/openmodelica_kernel/main.py", line 43, in
IPKernelApp.launch_instance(kernel_class=OpenModelicaKernel)
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 457, in initialize
self.init_kernel()
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 368, in init_kernel
user_ns=self.user_ns,
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/app/openmodelica_kernel/kernel.py", line 125, in init
self.omc=OMCSessionZMQ()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 502, in init
self._connect_to_omc()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 528, in _connect_to_omc
raise Exception
Exception
name 'reload' is not defined
[I 15:09:13.953 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel 820ab535-a82a-42eb-a25c-4d4395c6c59b restarted
2017-11-27 15:09:17,144 - OMPython - ERROR - OMC Server is down. Please start it! Log-file says:
Error: You are trying to run OpenModelica as a server using the root user.
This is a very bad idea:

  • The socket interface does not authenticate the user.
  • OpenModelica allows execution of arbitrary commands.
    Execution failed!

Traceback (most recent call last):
File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/app/openmodelica_kernel/main.py", line 43, in
IPKernelApp.launch_instance(kernel_class=OpenModelicaKernel)
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 457, in initialize
self.init_kernel()
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 368, in init_kernel
user_ns=self.user_ns,
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/app/openmodelica_kernel/kernel.py", line 125, in init
self.omc=OMCSessionZMQ()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 502, in init
self._connect_to_omc()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 528, in _connect_to_omc
raise Exception
Exception
[I 15:09:19.963 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel 820ab535-a82a-42eb-a25c-4d4395c6c59b restarted
2017-11-27 15:09:23,179 - OMPython - ERROR - OMC Server is down. Please start it! Log-file says:
Error: You are trying to run OpenModelica as a server using the root user.
This is a very bad idea:

  • The socket interface does not authenticate the user.
  • OpenModelica allows execution of arbitrary commands.
    Execution failed!

Traceback (most recent call last):
File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/app/openmodelica_kernel/main.py", line 43, in
IPKernelApp.launch_instance(kernel_class=OpenModelicaKernel)
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 457, in initialize
self.init_kernel()
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 368, in init_kernel
user_ns=self.user_ns,
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/app/openmodelica_kernel/kernel.py", line 125, in init
self.omc=OMCSessionZMQ()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 502, in init
self._connect_to_omc()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 528, in _connect_to_omc
raise Exception
Exception
name 'reload' is not defined
[I 15:09:25.974 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel 820ab535-a82a-42eb-a25c-4d4395c6c59b restarted
2017-11-27 15:09:29,400 - OMPython - ERROR - OMC Server is down. Please start it! Log-file says:
Error: You are trying to run OpenModelica as a server using the root user.
This is a very bad idea:

  • The socket interface does not authenticate the user.
  • OpenModelica allows execution of arbitrary commands.
    Execution failed!

Traceback (most recent call last):
File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/app/openmodelica_kernel/main.py", line 43, in
IPKernelApp.launch_instance(kernel_class=OpenModelicaKernel)
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 457, in initialize
self.init_kernel()
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 368, in init_kernel
user_ns=self.user_ns,
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/app/openmodelica_kernel/kernel.py", line 125, in init
self.omc=OMCSessionZMQ()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 502, in init
self._connect_to_omc()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 528, in _connect_to_omc
raise Exception
Exception
name 'reload' is not defined
[I 15:09:31.989 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel 820ab535-a82a-42eb-a25c-4d4395c6c59b restarted
2017-11-27 15:09:35,217 - OMPython - ERROR - OMC Server is down. Please start it! Log-file says:
Error: You are trying to run OpenModelica as a server using the root user.
This is a very bad idea:

  • The socket interface does not authenticate the user.
  • OpenModelica allows execution of arbitrary commands.
    Execution failed!

Traceback (most recent call last):
File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/app/openmodelica_kernel/main.py", line 43, in
IPKernelApp.launch_instance(kernel_class=OpenModelicaKernel)
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 457, in initialize
self.init_kernel()
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 368, in init_kernel
user_ns=self.user_ns,
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/app/openmodelica_kernel/kernel.py", line 125, in init
self.omc=OMCSessionZMQ()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 502, in init
self._connect_to_omc()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 528, in _connect_to_omc
raise Exception
Exception
[I 15:09:38.000 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel 820ab535-a82a-42eb-a25c-4d4395c6c59b restarted
2017-11-27 15:09:41,249 - OMPython - ERROR - OMC Server is down. Please start it! Log-file says:
Error: You are trying to run OpenModelica as a server using the root user.
This is a very bad idea:

  • The socket interface does not authenticate the user.
  • OpenModelica allows execution of arbitrary commands.
    Execution failed!

Traceback (most recent call last):
File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/app/openmodelica_kernel/main.py", line 43, in
IPKernelApp.launch_instance(kernel_class=OpenModelicaKernel)
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 457, in initialize
self.init_kernel()
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 368, in init_kernel
user_ns=self.user_ns,
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/app/openmodelica_kernel/kernel.py", line 125, in init
self.omc=OMCSessionZMQ()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 502, in init
self._connect_to_omc()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 528, in _connect_to_omc
raise Exception
Exception
[I 15:09:44.015 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel 820ab535-a82a-42eb-a25c-4d4395c6c59b restarted
2017-11-27 15:09:47,277 - OMPython - ERROR - OMC Server is down. Please start it! Log-file says:
Error: You are trying to run OpenModelica as a server using the root user.
This is a very bad idea:

  • The socket interface does not authenticate the user.
  • OpenModelica allows execution of arbitrary commands.
    Execution failed!

Traceback (most recent call last):
File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/app/openmodelica_kernel/main.py", line 43, in
IPKernelApp.launch_instance(kernel_class=OpenModelicaKernel)
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 457, in initialize
self.init_kernel()
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 368, in init_kernel
user_ns=self.user_ns,
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/app/openmodelica_kernel/kernel.py", line 125, in init
self.omc=OMCSessionZMQ()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 502, in init
self._connect_to_omc()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 528, in _connect_to_omc
raise Exception
Exception
[I 15:09:50.028 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel 820ab535-a82a-42eb-a25c-4d4395c6c59b restarted
2017-11-27 15:09:53,232 - OMPython - ERROR - OMC Server is down. Please start it! Log-file says:
Error: You are trying to run OpenModelica as a server using the root user.
This is a very bad idea:

  • The socket interface does not authenticate the user.
  • OpenModelica allows execution of arbitrary commands.
    Execution failed!

Traceback (most recent call last):
File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/app/openmodelica_kernel/main.py", line 43, in
IPKernelApp.launch_instance(kernel_class=OpenModelicaKernel)
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 457, in initialize
self.init_kernel()
File "/usr/local/lib/python3.4/dist-packages/ipykernel/kernelapp.py", line 368, in init_kernel
user_ns=self.user_ns,
File "/usr/local/lib/python3.4/dist-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/app/openmodelica_kernel/kernel.py", line 125, in init
self.omc=OMCSessionZMQ()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 502, in init
self._connect_to_omc()
File "/usr/local/lib/python3.4/dist-packages/OMPython/init.py", line 528, in _connect_to_omc
raise Exception
Exception
[

docker link dead

hi there,
the link to docker is now dead... is this method still supported?
cheers

Numpy dependency not recorded

This is a really bite-sized issue. The dependency on numpy is not reflected in setup.py's install_requires.

At the same time a dependency on OMPython should be added. Here, a minimum OMPython could maybe be set such that the requirement of OpenModelica >1.12.0 (see #5) could be codified in that way (since OMPython comes with Openmodelica, right?)

New ZMQ version kernel does not start

I'm getting the following error message:

File "/opt/conda/lib/python3.6/site-packages/openmodelica_kernel/kernel.py", line 39, in <module>
reload(sys)
NameError: name 'reload' is not defined

Plot is not displayed in line

I successfully installed jupyter-notebook and the openmodelica kernel on mac (using Python2.7).
Simulation works and even plotting (with plot(x); a window with OMPlot opens, with plot(x) (without semicolon) the plot was shown in line.
However, since I installed anew (tried if Python3 works, but did not, so I reinstalled everything for 2.7) plotting no longer works in line ("No result File Generated"), external plot(x); works fine.
Anyone got an idea what is going on?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.