Tree view on imported projects

The tree view isn’t showing on imported projects, but is on non imported projects. It’s this way for two cryoSPARC instances. Is there some way to refresh things? A cryosparcm command?

Hi @Geoffrey,

Whenever you navigate to the tree view for a project or workspace, it tries to calculate the layout and update the tiles. Are you still not able to see the tree view when you refresh the page?

Perhaps there could be an error in the logs:

cryosparcm log command_core

Regards,
Suhail

The tree view is empty. See the (cropped) picture.

I refreshed and then ran cryosparcm log command_core.

The tail end of that output is below:

Changed job P1.J642 status launched
Changed job P1.J642 status started
Changed job P1.J642 status running
[JSONRPC ERROR  2020-04-01 11:28:19.975291  at  layout_tree ]
-----------------------------------------------------
Traceback (most recent call last):
  File "cryosparc2_command/command_core/__init__.py", line 114, in wrapper
    res = func(*args, **kwargs)
  File "cryosparc2_command/command_core/__init__.py", line 4547, in layout_tree
    treegap=treegap)
  File "cryosparc2_master/cryosparc2_command/command_core/core.py", line 342, in cryosparc2_command.command_core.core.layout_tree
KeyError: u'J2'
-----------------------------------------------------
[EXPORT_WORKSPACES] : Exporting all workspaces in P1...
[EXPORT_WORKSPACES] : Exported all workspaces in P1 to /run/media/owner/Data1/P1/workspaces.json in 0.06s
[JSONRPC ERROR  2020-04-01 12:06:26.497263  at  layout_tree ]
-----------------------------------------------------
Traceback (most recent call last):
  File "cryosparc2_command/command_core/__init__.py", line 114, in wrapper
    res = func(*args, **kwargs)
  File "cryosparc2_command/command_core/__init__.py", line 4547, in layout_tree
    treegap=treegap)
  File "cryosparc2_master/cryosparc2_command/command_core/core.py", line 342, in cryosparc2_command.command_core.core.layout_tree
KeyError: u'J2'
-----------------------------------------------------
[JSONRPC ERROR  2020-04-01 12:06:26.498871  at  create_new_job ]
-----------------------------------------------------
Traceback (most recent call last):
  File "cryosparc2_command/command_core/__init__.py", line 114, in wrapper
    res = func(*args, **kwargs)
  File "cryosparc2_command/command_core/__init__.py", line 3634, in create_new_job
    layout_tree(project_uid, None, None, project_uid)
  File "cryosparc2_command/command_core/__init__.py", line 123, in wrapper
    raise e
KeyError: u'J2'
-----------------------------------------------------
Traceback (most recent call last):
  File "cryosparc2_command/command_core/__init__.py", line 114, in wrapper
    res = func(*args, **kwargs)
  File "cryosparc2_command/command_core/__init__.py", line 4547, in layout_tree
[JSONRPC ERROR  2020-04-01 12:31:15.183186  at     treegap=treegap)
  File "cryosparc2_master/cryosparc2_command/command_core/core.py", line 342, in cryosparc2_command.command_core.core.layout_tree
KeyError: u'J2'
 -----------------------------------------------------
[JSONRPC ERROR  2020-04-01 12:31:31.924098  at  layout_tree ]
-----------------------------------------------------
Traceback (most recent call last):
  File "cryosparc2_command/command_core/__init__.py", line 114, in wrapper
    res = func(*args, **kwargs)
  File "cryosparc2_command/command_core/__init__.py", line 4547, in layout_tree
    treegap=treegap)
  File "cryosparc2_master/cryosparc2_command/command_core/core.py", line 342, in cryosparc2_command.command_core.core.layout_tree
KeyError: u'J2'
-----------------------------------------------------

P1 is called Imported: Imported: <NAME>. It was imported twice, because we stopped using an instance on a computer to trouble shoot it, did some work on a second computer, and then moved it back to the first computer when the problem was fixed.

The next project in this instance is P3. It wasn’t imported. No folder called P2 exists at /run/media/owner/Data1/P2. I think P1 was P2 on one of the previous imports.

Hi @Geoffrey,

Thanks for the additional info. The command_core logs show that the layout algorithm got stuck looking for J2, which it expected to be part of the project. Do you happen to know whether the imported project includes a job with the ID J2? If so, is it deleted?

Thanks,
Suhail

J2 is still there in the project directory, but it does not appear in the webapp. So there seems to be some inconsistency… if J2 had been deleted through the webapp, then the files (that are there) would not be there.

owner@owner-System-Product-Name:/run/media/owner/Data1/P1/J2$ ls * -1
events.bson
imported_movies.cs
job.json
job.log
P1_J130_imported_movies.csg

gridfs_data:
gridfsdata_0

imported:
FoilHole_26982607_Data_26982677_26982679_20200127_091001_Fractions.mrc

J1 and J3 are also not in the webapp

There is no J1 directory

J3 has

owner@owner-System-Product-Name:/run/media/owner/Data1/P1/J3$ ls * -1
events.bson
job.json

gridfs_data:

I moved J2 out of the project directory and tried the tree view again. But the tree view mode is blank as before and I get the same message with cryosparcm log command_core

[JSONRPC ERROR  2020-04-09 15:26:17.883505  at  layout_tree ]
-----------------------------------------------------
Traceback (most recent call last):
  File "cryosparc2_command/command_core/__init__.py", line 114, in wrapper
    res = func(*args, **kwargs)
  File "cryosparc2_command/command_core/__init__.py", line 4547, in layout_tree
    treegap=treegap)
  File "cryosparc2_master/cryosparc2_command/command_core/core.py", line 342, in cryosparc2_command.command_core.core.layout_tree
KeyError: u'J2'
-----------------------------------------------------

When my jobs are done running I will do cryosparcm restart.

I restarted, but the issue is still the same.

-----------------------------------------------------
[JSONRPC ERROR  2020-04-14 14:24:25.960401  at  layout_tree ]
-----------------------------------------------------
Traceback (most recent call last):
  File "cryosparc2_command/command_core/__init__.py", line 114, in wrapper
    res = func(*args, **kwargs)
  File "cryosparc2_command/command_core/__init__.py", line 4547, in layout_tree
    treegap=treegap)
  File "cryosparc2_master/cryosparc2_command/command_core/core.py", line 342, in cryosparc2_command.command_core.core.layout_tree
KeyError: u'J2'
-----------------------------------------------------

Perhaps there is a some file where J2 is coming from that I could delete/regenerate somehow? I deleted J2 in the project directory, and also put in an empty J2 directory; I still get the same error.

Hi @Geoffrey,

Is J2 inside of MongoDB? You can check by entering the CLI (cryosparcm mongo), then:

db.jobs.findOne({ project_uid: 'P1', uid: 'J2' }, { project_uid: 1, uid: 1, deleted: 1 })

Regards,
Suhail

Hey @Geoffrey,

Is it possible if you can explain how you imported it the second time?

This is what I got for J2 inside of Mongo. It’s null, so I guess that means it is not in the database.

owner@owner-System-Product-Name:~$ cryosparcm mongo
MongoDB shell version v3.4.10-4-g67ee356c6b
connecting to: mongodb://localhost:39001/meteor
MongoDB server version: 3.4.10-4-g67ee356c6b
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
	http://docs.mongodb.org/
Questions? Try the support group
	http://groups.google.com/group/mongodb-user
Server has startup warnings:
2020-04-14T14:21:15.003-0400 I STORAGE  [initandlisten]
2020-04-14T14:21:15.003-0400 I STORAGE  [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2020-04-14T14:21:15.003-0400 I STORAGE  [initandlisten] **          See http://dochub.mongodb.org/core/prodnotes-filesystem
2020-04-14T14:21:15.132-0400 I CONTROL  [initandlisten]
2020-04-14T14:21:15.132-0400 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2020-04-14T14:21:15.132-0400 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2020-04-14T14:21:15.133-0400 I CONTROL  [initandlisten]
meteor:PRIMARY> db.jobs.findOne({ project_uid: 'P1', uid: 'J2' }, { project_uid: 1, uid: 1, deleted: 1 })
null
meteor:PRIMARY> ^C
bye

Other jobs:

meteor:PRIMARY> db.jobs.findOne({ project_uid: 'P1', uid: 'J1' }, { project_uid: 1, uid: 1, deleted: 1 })
{
	"_id" : ObjectId("5e4c7585b403bd16416defd8"),
	"uid" : "J1",
	"project_uid" : "P1",
	"deleted" : true
}
meteor:PRIMARY> db.jobs.findOne({ project_uid: 'P1', uid: 'J3' }, { project_uid: 1, uid: 1, deleted: 1 })
{
	"_id" : ObjectId("5e4c75a8b403bd16416e789f"),
	"uid" : "J3",
	"project_uid" : "P1",
	"deleted" : true
}
meteor:PRIMARY> db.jobs.findOne({ project_uid: 'P1', uid: 'J4' }, { project_uid: 1, uid: 1, deleted: 1 })
{
	"_id" : ObjectId("5e4c75acb403bd16416ea0f1"),
	"uid" : "J4",
	"project_uid" : "P1",
	"deleted" : false
}

Hey @Geoffrey,

We haven’t been able to reproduce this on our side- is it possible if you can explain how you imported the project a second time?

Sorry for the delay on this. I did look into it when you mentioned it before. Someone else in the lab did it and I’m verifying with them what exactly was done. Stay tuned…

To the best of my knowledge this is what was done

  1. Start project on “computer 2”. Export project.

  2. Import project to “computer 1”. Run a few jobs. Export project.

  3. Delete cryosparc instance on “computer 2” (this was done multiple times with different reinstalls, when we were fixing the BIOS issue.

  4. Import project from #2 to “computer 2”. This is the project we are currently working with.

Although I tried tracking exactly what happened down, I wasn’t able to. But it’s my best guess.

Hi Geoff,

Thanks for the additional information, we will look into it further.

- Suhail

Any solution here - I also seem to have a similar observation for a projected that was imported twice. Imported from cs-live followed by a second import after my database became irreversibly corrupted.

In my case all jobs sit beside each other along the top of the pane. There is no tree.

Best,
Joe