PASTA-ELN / pasta-eln

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

Removing the organization from "Author" configuration #222

Closed HTsybenko closed 4 months ago

HTsybenko commented 4 months ago

1) Go to the Authors in configuration, click on “-” in the organization list. Saving results in the following error:

Traceback (most recent call last): File "/home/htsybenko/Temp/envir/lib/python3.10/site-packages/pasta_eln/guiStyle.py", line 58, in self.clicked.connect(lambda: widget.execute(command)) File "/home/htsybenko/Temp/envir/lib/python3.10/site-packages/pasta_eln/GUI/configAuthors.py", line 114, in execute self.author['organizations'][j]['organization'] = self.userOrg.text().strip() IndexError: list index out of range

2) Trying to open configuration menu after this: Traceback (most recent call last): File "/home/htsybenko/Temp/envir/lib/python3.10/site-packages/pasta_eln/guiStyle.py", line 125, in self.triggered.connect(lambda : widget.execute(command)) File "/home/htsybenko/Temp/envir/lib/python3.10/site-packages/pasta_eln/gui.py", line 193, in execute dialog = Configuration(self.comm) File "/home/htsybenko/Temp/envir/lib/python3.10/site-packages/pasta_eln/GUI/config.py", line 34, in init tabGUI = ConfigurationAuthors(self.comm, self.finished) File "/home/htsybenko/Temp/envir/lib/python3.10/site-packages/pasta_eln/GUI/configAuthors.py", line 46, in init self.userRorid = self.addRowText('rorid','RORID') File "/home/htsybenko/Temp/envir/lib/python3.10/site-packages/pasta_eln/GUI/configAuthors.py", line 69, in addRowText rightW.setText(self.author['organizations'][0][item]) IndexError: list index out of range

3) Restarting PASTA after this: 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/Temp/envir/lib/python3.10/site-packages/pasta_eln/gui.py", line 278, in startMain() File "/home/htsybenko/Temp/envir/lib/python3.10/site-packages/pasta_eln/gui.py", line 270, in startMain app, window = mainGUI() File "/home/htsybenko/Temp/envir/lib/python3.10/site-packages/pasta_eln/gui.py", line 231, in mainGUI main_window = MainWindow() File "/home/htsybenko/Temp/envir/lib/python3.10/site-packages/pasta_eln/gui.py", line 45, in init self.backend = Backend() File "/home/htsybenko/Temp/envir/lib/python3.10/site-packages/pasta_eln/backend.py", line 33, in init self.initialize(defaultProjectGroup, **kwargs) File "/home/htsybenko/Temp/envir/lib/python3.10/site-packages/pasta_eln/backend.py", line 50, in initialize self.configuration |= json.load(confFile) File "/usr/lib/python3.10/json/init.py", line 293, in load return loads(fp.read(), File "/usr/lib/python3.10/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/usr/lib/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

SteffenBrinckmann commented 4 months ago

fixed in 2.5.0b6

HTsybenko commented 4 months ago

The issue was not fully fixed in 2.5.0b6.

The error in 2 (Trying to open configuration menu after clicking on “-” in the organization list and saving) still occurs.

SteffenBrinckmann commented 4 months ago

@HTsybenko can you check this? If this is solved, we can create a release and go to the next set of issues

HTsybenko commented 4 months ago

@SteffenBrinckmann The issue is partially solved.

New related error:

  1. Go to the Authors in configuration, click on “-” in the organization list.
  2. Click on “-” in the organization list for the second time.

Traceback (most recent call last): File "/home/htsybenko/Temp/envir/lib/python3.10/site-packages/pasta_eln/guiStyle.py", line 95, in self.clicked.connect(lambda: widget.execute(command)) File "/home/htsybenko/Temp/envir/lib/python3.10/site-packages/pasta_eln/GUI/configAuthors.py", line 130, in execute self.author['organizations'].pop(k) IndexError: pop from empty list

  1. Add the information into the form and save

Traceback (most recent call last): File "/home/htsybenko/Temp/envir/lib/python3.10/site-packages/pasta_eln/guiStyle.py", line 58, in self.clicked.connect(lambda: widget.execute(command)) File "/home/htsybenko/Temp/envir/lib/python3.10/site-packages/pasta_eln/GUI/configAuthors.py", line 116, in execute self.author['organizations'][j]['organization'] = self.userOrg.text().strip() IndexError: list index out of range

HTsybenko commented 4 months ago

The issue is fixed in pasta_eln-2.5.0b8.