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
using (Py.GIL())
{
// import visbrain
dynamic myVisbrain = Py.Import("visbrain");
Console.WriteLine("hi visbrain");
// import topo from Visbrain
dynamic myTopo = myVisbrain.Topo();
Console.WriteLine("hi topo");
// Create a list of channels, data, title and colorbar label :
dynamic myName = "Test";
dynamic myTitle = "Basic topoplot illustration";
dynamic myCblabel = "Colorbar label";
dynamic myChannels = new List<String> { "C3", "C4", "Cz", "Fz", "Pz" };
dynamic myData = new List<Double> { 10, 20, 30, 10, 10 };
// ERROR OCCURS HERE
// Add a central topoplot :
myTopo.add_topoplot(myName, myChannels, Py.kw("channels", myData), Py.kw("title", myTitle), Py.kw("cblabel", myCblabel));
// show
// myTopo.show();
}
error message :
Python.Runtime.PythonException: 'UnboundLocalError : local variable 'keeponly' referenced before assignment'
stack trace :
Python.Runtime.PythonException
HResult=0x80131500
Message=UnboundLocalError : local variable 'keeponly' referenced before assignment
Source=Python.Runtime
StackTrace:
[' File "d:\\Anaconda3\\envs\\py36\\lib\\site-packages\\visbrain\\topo\\topo.py", line 153, in add_topoplot\n margin)\n', ' File "d:\\Anaconda3\\envs\\py36\\lib\\site-packages\\visbrain\\visuals\\TopoVisual.py", line 197, in __init__\n auto = self._get_channel_coordinates(xyz, channels, system, unit)\n', ' File "d:\\Anaconda3\\envs\\py36\\lib\\site-packages\\visbrain\\visuals\\TopoVisual.py", line 388, in _get_channel_coordinates\n if any(keeponly):\n']
Any idea on this issue ? Thank You.
The text was updated successfully, but these errors were encountered:
I trying to implement Visbrain in a c# program, using Visual Studio 2017 Community.
Embedding python in c# by using Pythonnet.
below is my
pip list
Follow is the code :
error message :
Python.Runtime.PythonException: 'UnboundLocalError : local variable 'keeponly' referenced before assignment'
stack trace :
Any idea on this issue ? Thank You.
The text was updated successfully, but these errors were encountered: