I can select most patterns, but anything from imagen/random.py, e.g. UniformRandom, gives the error below. I can replicate the error on any PatternGenerator by making it inherit from TimeAwareRandomState (as those in random.py already do), e.g. by copying Constant to random.py, then changing its first line to:
class NewConstant(PatternGenerator,TimeAwareRandomState):
So something about inheriting from TimeAwareRandomState is itself causing this problem, not anything actually in random.py...
WARNING:root:Time: 000000.00 TopoConsole00338: (AttributeError) 'NoneType' object has no attribute 'replace'
Traceback (most recent call last):
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1489, in call
return self.func(*args)
File "/home/jbednar/research/topographica/external/paramtk/paramtk/init.py", line 671, in
tkvar.trace_variable('w',lambda a,b,c,p_name=name: self._handle_gui_set(p_name))
File "/home/jbednar/research/topographica/external/paramtk/paramtk/init.py", line 1339, in _handle_gui_set
self._update_param_from_tkvar(p_name,force)
File "/home/jbednar/research/topographica/external/paramtk/paramtk/init.py", line 1332, in _update_param_from_tkvar
super(TkParameterized,self)._update_param_from_tkvar(param_name)
File "/home/jbednar/research/topographica/external/paramtk/paramtk/init.py", line 798, in _update_param_from_tkvar
tkvar._on_modify()
File "/home/jbednar/research/topographica/topo/tkgui/testpattern.py", line 162, in change_pattern_generator
self.params_frame.set_PO(self.pattern_generator)
File "/home/jbednar/research/topographica/external/paramtk/paramtk/init.py", line 2337, in set_PO
self.change_PO(parameterized_object)
File "/home/jbednar/research/topographica/external/paramtk/paramtk/init.py", line 637, in change_PO
self._init_tkvars(PO)
File "/home/jbednar/research/topographica/external/paramtk/paramtk/init.py", line 645, in _init_tkvars
self._create_tkvar(PO,name,param)
File "/home/jbednar/research/topographica/external/paramtk/paramtk/init.py", line 659, in _create_tkvar
self._create_translator(name,param_obj)
File "/home/jbednar/research/topographica/external/paramtk/paramtk/init.py", line 981, in _create_translator
self.translators[name]=translator_type(param,initial_value=self.get_parameter_value(name))
File "/home/jbednar/research/topographica/external/paramtk/paramtk/init.py", line 2038, in init
self.last_string = self.object2string(initialvalue)
File "/home/jbednar/research/topographica/external/paramtk/paramtk/init.py", line 2064, in object2string
string=scriptrepr(object,[],"",[]).replace("\n","")
AttributeError: 'NoneType' object has no attribute 'replace'
If I open a Test Pattern window in the GUI:
./topographica -g examples/tiny.ty -c 'topo.guimain["Simulation"]["Test Pattern"]()'
I can select most patterns, but anything from imagen/random.py, e.g. UniformRandom, gives the error below. I can replicate the error on any PatternGenerator by making it inherit from TimeAwareRandomState (as those in random.py already do), e.g. by copying Constant to random.py, then changing its first line to:
class NewConstant(PatternGenerator,TimeAwareRandomState):
So something about inheriting from TimeAwareRandomState is itself causing this problem, not anything actually in random.py...
WARNING:root:Time: 000000.00 TopoConsole00338: (AttributeError) 'NoneType' object has no attribute 'replace' Traceback (most recent call last): File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1489, in call return self.func(*args) File "/home/jbednar/research/topographica/external/paramtk/paramtk/init.py", line 671, in
tkvar.trace_variable('w',lambda a,b,c,p_name=name: self._handle_gui_set(p_name))
File "/home/jbednar/research/topographica/external/paramtk/paramtk/init.py", line 1339, in _handle_gui_set
self._update_param_from_tkvar(p_name,force)
File "/home/jbednar/research/topographica/external/paramtk/paramtk/init.py", line 1332, in _update_param_from_tkvar
super(TkParameterized,self)._update_param_from_tkvar(param_name)
File "/home/jbednar/research/topographica/external/paramtk/paramtk/init.py", line 798, in _update_param_from_tkvar
tkvar._on_modify()
File "/home/jbednar/research/topographica/topo/tkgui/testpattern.py", line 162, in change_pattern_generator
self.params_frame.set_PO(self.pattern_generator)
File "/home/jbednar/research/topographica/external/paramtk/paramtk/init.py", line 2337, in set_PO
self.change_PO(parameterized_object)
File "/home/jbednar/research/topographica/external/paramtk/paramtk/init.py", line 637, in change_PO
self._init_tkvars(PO)
File "/home/jbednar/research/topographica/external/paramtk/paramtk/init.py", line 645, in _init_tkvars
self._create_tkvar(PO,name,param)
File "/home/jbednar/research/topographica/external/paramtk/paramtk/init.py", line 659, in _create_tkvar
self._create_translator(name,param_obj)
File "/home/jbednar/research/topographica/external/paramtk/paramtk/init.py", line 981, in _create_translator
self.translators[name]=translator_type(param,initial_value=self.get_parameter_value(name))
File "/home/jbednar/research/topographica/external/paramtk/paramtk/init.py", line 2038, in init
self.last_string = self.object2string(initialvalue)
File "/home/jbednar/research/topographica/external/paramtk/paramtk/init.py", line 2064, in object2string
string=scriptrepr(object,[],"",[]).replace("\n","")
AttributeError: 'NoneType' object has no attribute 'replace'