You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to add a video feed and am having trouble with my AddressFile.
I created an my_address_file.py based on this page of documentation. A downloadable example address file would be helpful instead of the current code snippets provided in the docs.
my attempted address file has the following content:
When trying to run a task I get the following error:
Exception in thread Thread-1 (update_gui):
Traceback (most recent call last):
File "C:\Users\karpo\pybehave_eval\Lib\site-packages\pybehave\GUIs\GUI.py", line 60, in __init__
file_globals = runpy.run_path(address_file, {"AddressFile": AddressFile})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen runpy>", line 286, in run_path
File "<frozen runpy>", line 98, in _run_module_code
File "<frozen runpy>", line 88, in _run_code
File "C:/Users/karpo/Desktop/py-behav/Local/my_address.py", line 2, in <module>
addresses = AddressFile()
^^^^^^^^^^^^^
TypeError: 'module' object is not callable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\karpo\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1073, in _bootstrap_inner
self.run()
File "C:\Users\karpo\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1010, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\karpo\pybehave_eval\Lib\site-packages\pybehave\Workstation\Workstation.py", line 222, in update_gui
self.guis[event.chamber] = gui(event, self.task_gui.subsurface(col * self.w, row * self.h, self.w, self.h), self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\karpo\pybehave_eval\Lib\site-packages\pybehave\GUIs\GUI.py", line 62, in __init__
raise MalformedAddressFileError
pybehave.Utilities.Exceptions.MalformedAddressFileError
The text was updated successfully, but these errors were encountered:
So the reason this crashed is because that initial import line is unnecessary. When the AddressFile is run, the import is automatically provided. There is a GUI tool on the dev branch which streamlines the creation process somewhat if you'd like to give that a try. There's some documentation on the feature in the dev branch version of the docs.
I will add example AddressFiles to the example-tasks repo though which is also relevant to #76
I am trying to add a video feed and am having trouble with my AddressFile.
I created an
my_address_file.py
based on this page of documentation. A downloadable example address file would be helpful instead of the current code snippets provided in the docs.my attempted address file has the following content:
When trying to run a task I get the following error:
The text was updated successfully, but these errors were encountered: