Running into Errors in the Jupyter Notebooks

19 views
Skip to first unread message

Dominique Hughes

unread,
Jul 13, 2023, 5:29:21 PM7/13/23
to TVB Users
Hello,

I am trying to run TVB from the python code and am working through the examples in the Jupyter notebooks. I am running into an error in the "interacting with the framework" notebook. In the third line of code, when I try to create a new project with the code line 'proj = new_project("sandbox")' I am getting this error:

--------------------------------------------------------------------------- KeyError Traceback (most recent call last) Cell In[3], line 1 ----> 1 proj = new_project("sandbox") File ~\OneDrive\Desktop\TVB_Distribution\tvb_data\Lib\site-packages\tvb\interfaces\command\lab.py:87, in new_project(name) 85 def new_project(name): 86 usr = UserService.get_administrators()[0] ---> 87 proj = ProjectService().store_project(usr, True, None, name=name, description=name, users=[usr]) 88 return proj File ~\OneDrive\Desktop\TVB_Distribution\tvb_data\Lib\site-packages\tvb\core\services\project_service.py:108, in ProjectService.store_project(self, current_user, is_create, selected_id, **data) 106 raise ProjectServiceException("A project can not be renamed while operations are still running!") 107 if is_create: --> 108 current_proj = Project(new_name, current_user.id, data["max_operation_size"], data["description"], 109 data["disable_imports"]) 110 self.storage_interface.get_project_folder(current_proj.name) 111 else: KeyError: 'max_operation_size'

Any help or guidance would be appreciated! If you have any questions, let me know.

Best,
Dominique Hughes

Lia Domide

unread,
Jul 17, 2023, 5:56:44 AM7/17/23
to TVB Users
Hi Dominique,

Thanks for writing us. There is indeed a bug in TVB_Distribution version 2.7.2

(see changes in lab.py, in function new_project).

To overcome this problem, you could:
- wait for a future TVB_Distribution release (it should come in max one month)
- or patch your local distribution:
  - ~\OneDrive\Desktop\TVB_Distribution\tvb_data\Lib\site-packages\tvb\interfaces\command\lab.py
   - line 87 from proj = ProjectService().store_project(usr, True, None, name=name, description=name, users=[usr])
   - should be: proj = ProjectService().store_project(usr, True, None, name=name, description=name, users=[usr], max_operation_size=1024, disable_imports=False)

Let me know how these are working for you,

Best,
Lia.

Dominique Hughes

unread,
Jul 17, 2023, 3:34:03 PM7/17/23
to tvb-...@googlegroups.com
Hi,

I used your fix to patch my local distribution and just finished running the notebook! Thank you so much for your help.

Best,
Dominique Hughes

--
You received this message because you are subscribed to a topic in the Google Groups "TVB Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tvb-users/QWXCEipw2WU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tvb-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tvb-users/299f9a82-5a68-48ea-9bfe-de7444651d78n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages