hi,
i am using python script to get the data from 'genereric stream reader',and output data to the 'GDF file writer'. this is the scenarios used to save the filtered data as gdf file, the python is just output the data as it received. when i run,the python script can print the data right, but the saved GDF file in 'GDF file writer' is wrong,the value is always '-0.9980'.
thank you for your help
how to get the data from python?
how to get the data from python?
- Attachments
-
- this is the scenarios used to save the filtered data as gdf file, the python is just output the data as it received
- scenarios.png (7.28 KiB) Viewed 7158 times
-
- it's the saved data in gdf file ,always '-0.9980'
- GDF saved value.png (14.28 KiB) Viewed 7161 times
-
- in the code ,i print the received 'chunk',
than output the chunk to 'output[0]' - python script code.png (42.64 KiB) Viewed 7161 times
- in the code ,i print the received 'chunk',
Re: how to get the data from python?
dennis wrote:hi,
i am using python script to get the data from 'genereric stream reader',and output data to the 'GDF file writer'. this is the scenarios used to save the filtered data as gdf file, the python is just output the data as it received. when i run,the python script can print the data right, but the saved GDF file in 'GDF file writer' is wrong,the value is always '-0.9980'.
thank you for your help
this is the output imformation when running the scenarios,we can see that the chunk can be print by python script rightly
- Attachments
-
- this is the output imformation when running the scenarios,we can see that the chunk can be print by python script rightly
- output imformation.png (42.1 KiB) Viewed 7155 times
Input/Output data in python
hi,
i want to use 'python script' to get the data from 'Generic stream reader' and output the data as it received , the detail can see 'viewtopic.php?f=6&t=9518' ,
can you help me ?
i want to use 'python script' to get the data from 'Generic stream reader' and output the data as it received , the detail can see 'viewtopic.php?f=6&t=9518' ,
can you help me ?
Re: how to get the data from python?
Hi,
Can you join the xml of your scenario please?
Guillaume
Can you join the xml of your scenario please?
Guillaume
Re: how to get the data from python?
gserrier wrote:Hi,
Can you join the xml of your scenario please?
Guillaume
hi,
i'm sorry to reply late,i have finished the output , but there is a new problem, the error is
[ INF ] At time 1.344 sec <Box algorithm::(0x0000212d, 0x0000449a) aka Python scripting> Traceback (most recent call last):
File "C:/Program Files/openvibe//share/openvibe/plugins/python/openvibe.py", line 173, in realProcess
self.process()
File "C:/Program Files/openvibe/share/openvibe/scenarios/box-tutorials/python/scripts/Classification_test.py", line 29, in process
for chunkIndex in range( len(self.input[0]) ):
TypeError: bad argument type for built-in operation
is the 'for chunkIndex in range( len(self.input[0]) ):' wrong? And the chunkIndex is not difined,is there something wrong in it ?
thank you for your help!
-
- Posts: 775
- Joined: Tue Dec 04, 2012 3:53 pm
- Location: INRIA Rennes, FRANCE
Re: how to get the data from python?
My suggestion is to look at the existing python examples bundled with openvibe. First get them to work. Then customize your thing starting from them with baby steps, and if it breaks at some point, don't proceed until you've traced back the issue.
Good luck,
Jussi
Good luck,
Jussi