Business Template : erp5_data_notebook (To execute remote python code from inside of erp5)
Addition of erp5_data_notebook bt5
Jupyter == IPython Notebook
Features:
- Module - Data Notebook (To save notebook according to reference from jupyter frontend)
- Execute python code which might/might not be remote.
- Save local_variables for specific notebook, i.e, you can use the python objects which were created during code execution. After making a successful connection(from frontend) to specific notebook, the variables which were saved earlier are available while for execution.
Architecture:
- Code from Jupyter cell is being received as string by Base_executeJupyter.
- Code is executed in Base_runJupyter external method.
- Local variables saved via CMFActivity.
- Result as JSON is returned to frontend (contains mime_type of result string also).
Example Notebook: http://nbviewer.ipython.org/urls/lab.nexedi.com/nexedi/erp5/uploads/6778782d5753873583bd4843772cf502/Proof_of_concept_Notebook.ipynb
Proof_of_concept_Notebook.ipynb
@Tyagov : Please review.
@kirr ->to join to merge request
mentioned in commit slapos@33954c66
mentioned in commit tiwariayush/slapos@33954c66
mentioned in commit kirr/slapos@33954c66
/cc @klaus
/cc @Kreisel
@tiwariayush Two
Error at Server Side
happened to me while working with jupyter:-
Sometimes, unpredictably, when executing a cell in the notebook I get
TypeError: expected string or Unicode object, NoneType found
in the ERP5 error log. One example here on my erp5 instance. -
At some point I started getting
TypeError: objectValues() got an unexpected keyword argument 'portal_type'
e.g. here for code which previously worked and does still work but in a different notebook.
None of these are pressing issues, just wanted to let you know.
-
mentioned in commit Nicolas/slapos@33954c66
mentioned in merge request slapos!43 (merged)
Slapos part: slapos!43 (merged)
Current state is: erp5-data-notebook somehow works on server side, but is known (see slapos!43 (merged)) to have at least the following limitations:
- errors are not reported properly to users;
- state is not fully saved to ZODB.
the latter point means notebook works only if it is connected to Zope family with only 1 zope process.
@Tyagov reviewed this work. With Ivan we decided to take the following route:
- document current limitations;
- do not furtner delay this merge and just merge it now.
I have made changes to check for
matplotlib.pyplot
but my ipv6 seems to have facing some problems due to which i am unable to access any ipv6 currently. I am fixing the problem, meanwhile can @Tyagov please add this change as a commit :https://softinst60035.host.vifib.net/erp5/portal_templates/98/BusinessTemplate_viewVcsDiff
user - zope password - insecure
Thanks beforehand.
but my ipv6 seems to have facing some problems due to which i am unable to access any ipv6 currently.
@tiwariayush, FYI if I understand correctly, you need to upgrade your Re6st to make it work again. /cc @jm
Update: original work merged to erp5 master: f662b5a2.
mentioned in commit kirr/slapos@0a446263
but my ipv6 seems to have facing some problems due to which i am unable to access any ipv6 currently.
@tiwariayush, FYI if I understand correctly, you need to upgrade your Re6st to make it work again. /cc @jm
I didn't close the old network, so it should work. But since there's nobody else, I think I'm going to close it now. So yes, please upgrade.
@tiwariayush , can you please commit this change you mention to your branch ?
mentioned in commit slapos@0a446263
mentioned in commit slapos@519a575d
@jm : Is the pypi of re6stnet updated? Doesn't look like it. Should I use the one on git.erp5.org ? Also, is there a documentation on how to work out with installation cause from what I remember this one is outdated -
https://www.erp5.com/web_page_module/3183/view
and you did provide with one which was up-to-date.@tiwariayush: Ah you were not notified. I forwarded you an email explaining how to upgrade.
@tiwariayush: Ah you were not notified. I forwarded you an email explaining how to upgrade.
@jm, why do we need to send private mails about how to upgrade? Why don't we have upgrade notes here
https://lab.nexedi.com/nexedi/re6stnet/blob/master/CHANGES
and on http://re6st.net (to which re6stnet setup.py points to: https://lab.nexedi.com/nexedi/re6stnet/blob/f4427cf4/setup.py#L71 and thus we also have it as re6stnet homepage on pypi too: https://pypi.python.org/pypi/re6stnet) ?
Re6stnet is open project after all. Correct?
/cc @Nicolas
@jm, why do we need to send private mails about how to upgrade? Why don't we have upgrade notes here
https://lab.nexedi.com/nexedi/re6stnet/blob/master/CHANGES
and on http://re6st.net (to which re6stnet setup.py points to: https://lab.nexedi.com/nexedi/re6stnet/blob/f4427cf4/setup.py#L71 and thus we also have it as re6stnet homepage on pypi too: https://pypi.python.org/pypi/re6stnet) ?
Re6stnet is open project after all. Correct?
Simply because there's a clear distinction between the project and the deployment. And about the project itself, there isn't much to say, except giving general hints about to migrate smoothly an existing network, but it's more work again and it would not be enough for users. I doubt the legacy version is used outside Nexedi, but I would be happy to help if someone comes with a question.
This is good idea, but until we have it (and later complementary to it) I do not understand why we don't have even minimal changelog and notes. And there were not only deployment releated changes, so I do not buy that argument for empty changelog.
And the main site, to which sources/pypi refers, being parked does not help either.
To me it looks like the project documentation is derelict, which imho does not help re6stnet adoption.
mentioned in commit kirr/slapos@519a575d
@tiwariayush While doing release I saw that erp5 kernel doesn't show images as such but their base64 encoding. Is this related to: Ayush Tiwari @tiwariayush 11 days ago
I have made changes to check for matplotlib.pyplot but my ipv6 seems to have facing some problems due to which i am unable to access any ipv6 currently. I am fixing the problem, meanwhile can @Tyagov please add this change as a commit :
https://softinst60035.host.vifib.net/erp5/portal_templates/98/BusinessTemplate_viewVcsDiff
user - zope password - insecure
Thanks beforehand.
If so please commit change as your instance raises with: Error Type: OperationalError Error Value: (1129, "Host '10.0.41.154' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'")
mentioned in commit tiwariayush/slapos@0a446263
mentioned in commit tiwariayush/slapos@519a575d
mentioned in commit rafael/slapos@33954c66
mentioned in commit rafael/slapos@0a446263
mentioned in commit rafael/slapos@519a575d
mentioned in merge request slapos!63 (closed)
mentioned in commit f662b5a2