Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

NameError: global name 'v_rest_e' is not defined #5

Closed
assadRasheed opened this issue May 23, 2018 · 1 comment
Closed

NameError: global name 'v_rest_e' is not defined #5

assadRasheed opened this issue May 23, 2018 · 1 comment

Comments

@assadRasheed
Copy link

assadRasheed commented May 23, 2018

i am trying to run the Mnist repository but got the following error.need your help to resolve this issue.

NameError                                 Traceback (most recent call last)
<ipython-input-2-1052c970edd9> in <module>()
    349 
    350 neuron_groups['e'] = b.NeuronGroup(n_e*len(population_names), neuron_eqs_e, threshold= v_thresh_e, refractory= refrac_e, reset= scr_e, 
--> 351                                    compile = True, freeze = True)
    352 neuron_groups['i'] = b.NeuronGroup(n_i*len(population_names), neuron_eqs_i, threshold= v_thresh_i, refractory= refrac_i, reset= v_reset_i, 
    353                                    compile = True, freeze = True)

C:\ProgramData\Anaconda5\envs\py27\lib\site-packages\brian\fundamentalunits.pyc in new_f(*args, **kwds)
   1406                                                      str(au[k]),
   1407                                                      get_dimensions(newkeyset[k]))
-> 1408             result = f(*args, **kwds)
   1409             if "result" in au:
   1410                 assert have_same_dimensions(result, au["result"]), \

C:\ProgramData\Anaconda5\envs\py27\lib\site-packages\brian\neurongroup.pyc in __init__(self, N, model, threshold, reset, init, refractory, level, clock, order, implicit, unit_checking, max_delay, compile, freeze, method, max_refractory)
    283         if isinstance(threshold, str):
    284             if isinstance(model, Equations):
--> 285                 threshold = select_threshold(threshold, model, level=level + 1)
    286             else:
    287                 threshold = StringThreshold(threshold, level=level + 1)

C:\ProgramData\Anaconda5\envs\py27\lib\site-packages\brian\threshold.pyc in select_threshold(expr, eqs, level)
    101     # non-constant.
    102     expr = expr.strip()
--> 103     eqs.prepare()
    104     ns = namespace(expr, level=level + 1)
    105     s = re.search(r'^\s*(\w+)\s*>=?(.+)', expr)

C:\ProgramData\Anaconda5\envs\py27\lib\site-packages\brian\equations.pyc in prepare(self, check_units)
    371         self.compile_functions()
    372         # Check units
--> 373         if check_units: self.check_units()
    374         # Set the update order of (static) variables
    375         self.set_eq_order()

C:\ProgramData\Anaconda5\envs\py27\lib\site-packages\brian\equations.pyc in check_units(self)
    457                 f.func_globals.update(namespace_replace_quantity_with_pure(f.func_globals))
    458                 units = namespace_replace_quantity_with_pure(self._units)
--> 459                 self.apply(var, units) + (self._units[var] / second) # Check that the two terms have the same dimension
    460                 f.func_globals.update(old_func_globals)
    461         except DimensionMismatchError, inst:

C:\ProgramData\Anaconda5\envs\py27\lib\site-packages\brian\equations.pyc in apply(self, state, vardict)
    590             # could add something like: if var not in vardict: this would allow you to override the dependencies if you wanted to - worth doing?
    591             vardict[var] = call_with_dict(self._function[var], vardict)
--> 592         return f(*[vardict[var] for var in f.func_code.co_varnames])
    593 
    594     """

<string> in <lambda>(v, I_synE, I_synI)

NameError: global name 'v_rest_e' is not defined
@mstimberg
Copy link
Member

Hi. I think that Brian scripts might not be fully compatible with jupyter notebooks (they did not exist yet when Brian was written), please run scripts in the standard way (python ...). If you still have trouble running things from the stdp-mnist repository, try getting support from their end.

Please note that we no longer develop Brian 1.x and only provide very basic maintenance support -- the current version is Brian 2 (https://github.com/brian-team/brian2).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants