bioelectric-interfaces / nfb_studio

NFB experiment designer.
https://bioelectric-interfaces.github.io/nfb_studio/
1 stars 0 forks source link

Running an experiment #3

Closed aksiotis closed 3 years ago

aksiotis commented 3 years ago

I have created a simple experiment for testing, xml is below the traceback. Nevertheless, some experiments (not created by me) work, so I suppose there was my fault during making the experiment settings, but I cannot find it. It's important that the traceback about the problem doesn't pop up inside NFB Studio, but I found it in the console.

Traceback (most recent call last):
  File "D:\Conda3\envs\nfb_studio\lib\multiprocessing\process.py", line 315, in _bootstrap
    self.run()
  File "D:\Conda3\envs\nfb_studio\lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "c:\users\владислав\nfb_studio\nfb_studio\experiment_view.py", line 31, in run
    run_experiment(file_path)
  File "D:\Conda3\envs\nfb_studio\Lib\site-packages\pynfb\main.py", line 116, in run
    params = xml_file_to_params(path)
  File "D:\Conda3\envs\nfb_studio\Lib\site-packages\pynfb\serializers\xml_.py", line 71, in xml_file_to_params
    d = format_odict_by_defaults(d, vectors_defaults)
  File "D:\Conda3\envs\nfb_studio\Lib\site-packages\pynfb\serializers\xml_.py", line 27, in format_odict_by_defaults
    formatted_odict[key] = format_odict_by_defaults(odict[key], defaults[key])
  File "D:\Conda3\envs\nfb_studio\Lib\site-packages\pynfb\serializers\xml_.py", line 19, in format_odict_by_defaults
    if key in odict.keys():
AttributeError: 'str' object has no attribute 'keys'
<?xml version="1.0" encoding="utf-8"?>
<NeurofeedbackSignalSpecs>
    <sExperimentName>First</sExperimentName>
    <sStreamName>NVX136_Data</sStreamName>
    <sPrefilterBand>None None</sPrefilterBand>
    <bDC>0</bDC>
    <sInletType>lsl_from_file</sInletType>
    <sRawDataFilePath>D:\EEGdataTest\experiment_data.h5</sRawDataFilePath>
    <sFTHostnamePort></sFTHostnamePort>
    <bPlotRaw>1</bPlotRaw>
    <bPlotSignals>1</bPlotSignals>
    <bPlotSourceSpace>0</bPlotSourceSpace>
    <bShowSubjectWindow>1</bShowSubjectWindow>
    <fRewardPeriodS>0.25</fRewardPeriodS>
    <sReference></sReference>
    <sReferenceSub></sReferenceSub>
    <bUseExpyriment>0</bUseExpyriment>
    <bShowPhotoRectangle>0</bShowPhotoRectangle>
    <sVizNotchFilters>0</sVizNotchFilters>
    <vProtocols>
        <FeedbackProtocol>
            <bUpdateStatistics>0</bUpdateStatistics>
            <iDropOutliers>0</iDropOutliers>
            <bSSDInTheEnd>0</bSSDInTheEnd>
            <fDuration>10.0</fDuration>
            <fbSource>All</fbSource>
            <sFb_type>Baseline</sFb_type>
            <cString>+</cString>
            <bVoiceover>0</bVoiceover>
            <bUseExtraMessage>0</bUseExtraMessage>
            <cString2></cString2>
            <fBlinkDurationMs>50</fBlinkDurationMs>
            <fBlinkThreshold>0</fBlinkThreshold>
            <sMockSignalFilePath></sMockSignalFilePath>
            <sMockSignalFileDataset></sMockSignalFileDataset>
            <iMockPrevious>0</iMockPrevious>
            <bReverseMockPrevious>0</bReverseMockPrevious>
            <bRandomMockPrevious>0</bRandomMockPrevious>
            <bRewardThreshold>0</bRewardThreshold>
            <bShowReward>0</bShowReward>
            <bPauseAfter>0</bPauseAfter>
            <bBeepAfter>0</bBeepAfter>
            <iRandomBound>0</iRandomBound>
            <sVideoPath></sVideoPath>
            <sMSignal>None</sMSignal>
            <fMSignalThreshold>1</fMSignalThreshold>
            <sProtocolName>Block1</sProtocolName>
        </FeedbackProtocol>
        <FeedbackProtocol>
            <bUpdateStatistics>0</bUpdateStatistics>
            <iDropOutliers>0</iDropOutliers>
            <bSSDInTheEnd>0</bSSDInTheEnd>
            <fDuration>10.0</fDuration>
            <fbSource>Alpha</fbSource>
            <sFb_type>Feedback</sFb_type>
            <cString></cString>
            <bVoiceover>0</bVoiceover>
            <bUseExtraMessage>0</bUseExtraMessage>
            <cString2></cString2>
            <fBlinkDurationMs>50</fBlinkDurationMs>
            <fBlinkThreshold>0</fBlinkThreshold>
            <sMockSignalFilePath></sMockSignalFilePath>
            <sMockSignalFileDataset></sMockSignalFileDataset>
            <iMockPrevious>0</iMockPrevious>
            <bReverseMockPrevious>0</bReverseMockPrevious>
            <bRandomMockPrevious>0</bRandomMockPrevious>
            <bRewardThreshold>0</bRewardThreshold>
            <bShowReward>0</bShowReward>
            <bPauseAfter>0</bPauseAfter>
            <bBeepAfter>0</bBeepAfter>
            <iRandomBound>0</iRandomBound>
            <sVideoPath></sVideoPath>
            <sMSignal>None</sMSignal>
            <fMSignalThreshold>1</fMSignalThreshold>
            <sProtocolName>Block2</sProtocolName>
        </FeedbackProtocol>
    </vProtocols>
    <vPGroups>
    </vPGroups>
    <vSignals>
        <DerivedSignal>
            <sSignalName>Alpha</sSignalName>
            <fAverage>0.0</fAverage>
            <fStdDev>1.0</fStdDev>
            <fSmoothingFactor>0.5</fSmoothingFactor>
            <method>cFIR</method>
            <fBandpassLowHz>7.0</fBandpassLowHz>
            <fBandpassHighHz>13.0</fBandpassHighHz>
            <fFFTWindowSize>1000.0</fFFTWindowSize>
            <sTemporalFilterType>butter</sTemporalFilterType>
            <SpatialFilterMatrix>D:\EEGdataTest\p4.txt</SpatialFilterMatrix>
        </DerivedSignal>
    </vSignals>
    <vPSequence>
        <s>Block1</s>
        <s>Block2</s>
    </vPSequence>
</NeurofeedbackSignalSpecs>
bindreams commented 3 years ago

Fixed in master.