PASTA-ELN / pasta-eln

PASTA-ELN with new frontend
https://pasta-eln.github.io/pasta-eln/
Other
7 stars 2 forks source link

CouchDB configuration in pasta_eln 2.3.6 #309

Open HTsybenko opened 6 days ago

HTsybenko commented 6 days ago
  1. Python updated to 3.12.4, Ubuntu version 24.04
  2. New environment was created for Python 3.12 to install PASTA-ELN
  3. Regular installation via "pip install pasta-eln"

CouchDB installation window shows the following error: image

After that, repairing configuration and creation of an example project is also not possible: ERROR dit01: Could not connect with username+password to local server ** CREATE EXAMPLE PROJECT AND SHOW **ERROR: database.py:saveDoc could not save, likely JSON issue {'-name': 'PASTAs Example Project', 'objective': 'Test if everything is working as intended.', 'status': 'active', 'comment': '#tag Can be used as reference or deleted', '-user': 'htsybenko', '-type': ['x0'], '-branch': [{'stack': [], 'child': 0, 'path': 'PastasExampleProject', 'show': [True]}], '_id': 'x-ddb5eff4277f490497855a0903e65b41', '-date': '2024-07-03T16:22:59.977815', '-tags': ['tag'], '-client': "main()|window = MainWindow()|sidebar = Sidebar(self.comm) #sidebar with buttons|configWindow.exec()|exampleData(False, self.callbackProgress)|backend.addData('x0', {'-name': 'PASTAs Example Project', 'objective': 'Test if everything is working as intended.', 'status': 'active', 'comment': '#tag Can be used as reference or deleted'})|doc = self.db.saveDoc(doc)|tracebackString = traceback.format_stack()"} Traceback (most recent call last): File "/home/htsybenko/pasta-env/lib/python3.12/site-packages/pasta_eln/dialogConfigSetupLinux.py", line 131, in analyse exampleData(False, self.callbackProgress) File "/home/htsybenko/pasta-env/lib/python3.12/site-packages/pasta_eln/installationTools.py", line 386, in exampleData backend.addData('x0', {'-name': 'PASTAs Example Project', 'objective': 'Test if everything is working as intended.', 'status': 'active', 'comment': '#tag Can be used as reference or deleted'}) File "/home/htsybenko/pasta-env/lib/python3.12/site-packages/pasta_eln/backend.py", line 243, in addData if self.cwd is not None and doc['-type'][0][0]=='x':


TypeError: 'NoneType' object is not subscriptable

In contrast, pasta_eln-2.6.0b1 does not cause such issues:

![image](https://github.com/PASTA-ELN/pasta-eln/assets/125445347/1739d7bf-1527-422d-8582-d624eb4172ac)
SteffenBrinckmann commented 6 days ago

Couchdb was not correctly installed, as such nothing can work. @HTsybenko

SteffenBrinckmann commented 6 days ago

At self, cause exception if cannot connect to server, pasta should stop immediate

HTsybenko commented 5 days ago

Couchdb was not correctly installed, as such nothing can work. @HTsybenko

  • the conclusion is, 2.3.6 does not work with environments and new Ubuntu?

My understanding is that the Ubuntu version has nothing to do with this since 2.3.6 worked well with 24.04 before the Python upgrade. The only difference was that it was previously tested in the Python 3.10.12 environment and the last time in 3.12.4.

  • we will tell people to encounter this problem to install the latest version, that should solve the issue, correct?

In my opinion, we should ensure that the officially released versions are stable for the most commonly used Python versions and test the basic functionality with those. From the user's perspective, enforcing a specific Python version for one particular package would not be welcomed.

SteffenBrinckmann commented 23 hours ago

@HTsybenko I don't, and never disagreed, with your last statement of the comment. I do see a point in stating obvious things and thereby suggesting that someone does have a different point of view. Something strange has happened: 2.3.6b1 was there for a long time and no problems were reported; I explicitly asked about that a few days ago. And now, suddenly an issue is there with the full version, strange. The only explanation I can see is that b1 was successfully tested without environment, as far as I understand your testing routine and the full version was unsuccessfully tested with environment.

HTsybenko commented 11 hours ago

@HTsybenko I don't, and never disagreed, with your last statement of the comment. I do see a point in stating obvious things and thereby suggesting that someone does have a different point of view.

@SteffenBrinckmann I am sorry if I misinterpreted some of your previous comments.

Something strange has happened: 2.3.6b1 was there for a long time and no problems were reported; I explicitly asked about that a few days ago. And now, suddenly an issue is there with the full version, strange. The only explanation I can see is that b1 was successfully tested without environment, as far as I understand your testing routine and the full version was unsuccessfully tested with environment.

All the pasta_eln versions are always tested inside a venv. Previously, only Python 3.10.12 environments were used for the testing purposes. After receiving a request on 02.07 to test the implementation of the PR #284, a new environment in 3.12.4 was created, and the discovered issues were then reported.

* Can you please rerun your test with 2.3.6b1 and 2.3.6 with the environment?

* The other issue with 2.3.6 is likely connected to using a environment.

Here is a report of all tests executed today.

Python 3.10.12

Tested versions:

  1. Default “pip install pasta_eln” installs pasta_eln-2.5.3
  2. Installation also possible for 2.5.3b1 when the version is specified
  3. 2.6.0b1 is not available, due to: ERROR: Ignored the following versions that require a different python version: 2.6.0b1 Requires-Python >=3.11

Installation: both pasta_eln-2.5.3, 2.5.3b1 installed without an issue.

Starting 2.5.3, 2.5.3b1 leads to the following messages (does not affect the initial "Start analyze and repair" setup sequence):

A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2.

Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/home/htsybenko/pasta_3_10/lib/python3.10/site-packages/pasta_eln/gui.py", line 11, in <module> from PySide6.QtCore import Qt, Slot, QCoreApplication # pylint: disable=no-name-in-module File "/home/htsybenko/pasta_3_10/lib/python3.10/site-packages/PySide6/init.py", line 111, in <module> _setupQtDirectories() File "/home/htsybenko/pasta_3_10/lib/python3.10/site-packages/PySide6/init.py", line 60, in _setupQtDirectories from shiboken6 import Shiboken File "/home/htsybenko/pasta_3_10/lib/python3.10/site-packages/shiboken6/init.py", line 25, in <module> from shiboken6.Shiboken import *

Python 3.11.9

Tested versions:

  1. Default “pip install pasta_eln” installs pasta_eln-2.3.7 (old version)
  2. pasta_eln-2.5.3, 2.5.3b1 not available for installation
  3. 2.6.0b1 can be installed when the version is specified

Installation: both pasta_eln-2.3.7 and 2.6.0b1 cab be installed without an issue.

Starting 2.3.7 and 2.6.0b1 leads to the following messages (does not affect the initial "Start analyze and repair" setup sequence):

A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2.

Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/home/htsybenko/pasta_3_11/lib/python3.11/site-packages/pasta_eln/gui.py", line 4, in from PySide6.QtCore import Qt, Slot # pylint: disable=no-name-in-module File "/home/htsybenko/pasta_3_11/lib/python3.11/site-packages/PySide6/init.py", line 124, in _setupQtDirectories() File "/home/htsybenko/pasta_3_11/lib/python3.11/site-packages/PySide6/init.py", line 64, in _setupQtDirectories from shiboken6 import Shiboken File "/home/htsybenko/pasta_3_11/lib/python3.11/site-packages/shiboken6/init.py", line 27, in from shiboken6.Shiboken import *

In addition, for 2.3.7, CouchDB cannot be configured. Screenshot from 2024-07-09 11-37-49

Python 3.12.4

Tested versions:

  1. Default “pip install pasta_eln” installs pasta_eln-2.3.6 (old version)
  2. pasta_eln-2.5.3, 2.5.3b1 not available for installation
  3. 2.6.0b1 can be installed when the version is specified

Installation: both pasta_eln-2.3.6 and 2.6.0b1 cab be installed without an issue.

Starting 2.3.6 and 2.6.0b1:

Screenshot from 2024-07-09 11-48-16

Summary

Users with Python 3.10 can install a stable pasta_eln-2.5.3 using a default command. Users with Python 3.11 and 3.12 would install old versions pasta_eln-2.3.6 and pasta_eln-2.3.7 with a default command and would not be able to use it due to the CouchDB problem.