Open HTsybenko opened 6 months ago
Interestingly, the issue does not occur when the "Configuration- Start analyze and repair" is not executed (exported project is still present, when its eln file is imported). In this case, the eln file overwrites the original project. #
This case should also be discussed, since data may be lost in the process.
Interesting and we need to solve it down the road.
After the last step: **ERROR: could not update document. Likely version conflict. Initial and current version: {'_id': 'm-2eb22ef62c7f4820bbb34c5c736000f5', '-name': 'item', '-date': '2024-03-15T15:45:29.634993', '-type': ['measurement'], '-branch': [{'stack': ['x-af779f1fb5ca499aa61d4b4e14e7a81d'], 'child': 9999, 'path': None, 'show': [True, True]}], '-gui': [True, True], '-client': 'startMain()|app.exec()|self.triggered.connect(lambda : widget.execute(command))|status = importELN(self.comm.backend, fileName)|addedDocuments += processPart(part)|addedDocs += processPart(child)|backend.db.saveDoc(doc)', '_rev': '1-718cb560112f3de8b7c1f0816de55ec3', '-tags': ['curated'], '-user': ''} {'_id': 'm-2eb22ef62c7f4820bbb34c5c736000f5', '-name': 'item', '-date': '2024-03-15T15:46:17.300030', '-type': ['measurement'], '-branch': [{'stack': ['x-af779f1fb5ca499aa61d4b4e14e7a81d'], 'child': 9999, 'path': None, 'show': [True, True]}], '-gui': [True, True], '-client': "startMain()|app.exec()|self.comm.formDoc.emit(doc)|ret = formWindow.exec()|self.clicked.connect(lambda: widget.execute(command))|self.comm.backend.editData(self.doc)|self.addData('-edit-', doc)|doc = self.db.updateDoc(doc, doc['_id'])", '_rev': '1-718cb560112f3de8b7c1f0816de55ec3', '-tags': ['_curated'], '-user': 'htsybenko', 'comment': ''} 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/form.py", line 445, in execute
self.comm.backend.editData(self.doc)
File "/home/htsybenko/Temp/envir/lib/python3.10/site-packages/pasta_eln/backend.py", line 119, in editData
self.addData('-edit-', doc)
File "/home/htsybenko/Temp/envir/lib/python3.10/site-packages/pasta_eln/backend.py", line 286, in addData
return doc['_id']
KeyError: '_id'
When closing editing field after that:
**ERROR: could not update document. Likely version conflict. Initial and current version: {'_id': 'm-2eb22ef62c7f4820bbb34c5c736000f5', '-name': 'item', '-date': '2024-03-15T15:45:29.634993', '-type': ['measurement'], '-branch': [{'stack': ['x-af779f1fb5ca499aa61d4b4e14e7a81d'], 'child': 9999, 'path': None, 'show': [True, True]}], '-gui': [True, True], '-client': 'startMain()|app.exec()|self.triggered.connect(lambda : widget.execute(command))|status = importELN(self.comm.backend, fileName)|addedDocuments += processPart(part)|addedDocs += processPart(child)|backend.db.saveDoc(doc)', '_rev': '1-718cb560112f3de8b7c1f0816de55ec3', '-tags': ['curated'], '-user': ''} {'_id': 'm-2eb22ef62c7f4820bbb34c5c736000f5', '-name': 'item', '-date': '2024-03-15T15:46:17.300030', '-type': ['measurement'], '-branch': [{'stack': ['x-af779f1fb5ca499aa61d4b4e14e7a81d'], 'child': 9999, 'path': None, 'show': [True, True]}], '-gui': [True, True], '-client': "startMain()|app.exec()|self.comm.formDoc.emit(doc)|ret = formWindow.exec()|self.clicked.connect(lambda: widget.execute(command))|self.comm.backend.editData(self.doc)|self.addData('-edit-', doc)|doc = self.db.updateDoc(doc, doc['_id'])", '_rev': '1-718cb560112f3de8b7c1f0816de55ec3', '-tags': ['_curated'], '-user': 'htsybenko', 'comment': ''} 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/form.py", line 445, in execute
self.comm.backend.editData(self.doc)
File "/home/htsybenko/Temp/envir/lib/python3.10/site-packages/pasta_eln/backend.py", line 119, in editData
self.addData('-edit-', doc)
File "/home/htsybenko/Temp/envir/lib/python3.10/site-packages/pasta_eln/backend.py", line 286, in addData
return doc['_id']
KeyError: '_id'
Editing the project metadata:
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/form.py", line 445, in execute
self.comm.backend.editData(self.doc)
File "/home/htsybenko/Temp/envir/lib/python3.10/site-packages/pasta_eln/backend.py", line 119, in editData
self.addData('-edit-', doc)
File "/home/htsybenko/Temp/envir/lib/python3.10/site-packages/pasta_eln/backend.py", line 273, in addData
if self.cwd is not None and doc['-type'][0][0]=='x':
KeyError: '-type'
pastaELN issue.log