ioam / topographica

A general-purpose neural simulator focusing on topographic maps.
topographica.org
BSD 3-Clause "New" or "Revised" License
53 stars 32 forks source link

AttributeError while using topographica #543

Open kalok87 opened 10 years ago

kalok87 commented 10 years ago

OS: Ubuntu 12.04 Version of topographica: 0.9.8 Error massage: kalok@kalok:~$ topographica -a -c "generate_example('gcal_10000.typ')"`` Found examples in /home/kalok/.local/share/topographica/examples /usr/local/bin/topographica /home/kalok/.local/share/topographica/examples/gcal.ty -c "topo.sim.run(10000)" -c " from topo.command.analysis import measure_or_pref; from topo.command.pylabplot import measure_position_pref,measure_cog,measure_or_tuning_fullfield; measure_or_pref(); #measure_position_pref(); measure_cog(); #measure_or_tuning_fullfield() " -c "from topo.command import save_snapshot ; save_snapshot('gcal_10000.typ')" In file included from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1761:0, from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:17, from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4, from /home/kalok/.python27_compiled/sc_b373d0df23bd7e002602a012c820e1440.cpp:22: /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp] Traceback (most recent call last): File "/usr/local/bin/topographica", line 18, in process_argv(argv[1:]) File "/home/kalok/.local/lib/python2.7/site-packages/topo/misc/commandline.py", line 549, in process_argv execfile(filename,main.dict) File "/home/kalok/.local/share/topographica/examples/gcal.ty", line 157, in nominal_bounds_template=sheet.BoundingBox(radius=0.25)) File "/home/kalok/.local/lib/python2.7/site-packages/topo/base/simulation.py", line 1500, in connect conn = connection_type(src=self[src],dest=self[dest],*_conn_params) File "/home/kalok/.local/lib/python2.7/site-packages/topo/projection/init.py", line 143, in init self._create_cfs() File "/home/kalok/.local/lib/python2.7/site-packages/topo/base/cf.py", line 617, in _create_cfs self.cfs = vectorized_create_cf(_self._generate_coords()) File "/home/kalok/.local/lib/python2.7/site-packages/topo/base/cf.py", line 610, in _generate_coords return vectorized_coord_mapper(X,Y) File "/usr/local/lib/python2.7/dist-packages/numpy/lib/function_base.py", line 1573, in call return self._vectorize_call(func=func, args=vargs) File "/usr/local/lib/python2.7/dist-packages/numpy/lib/function_base.py", line 1633, in _vectorize_call ufunc, otypes = self._get_ufunc_and_otypes(func=func, args=args) File "/usr/local/lib/python2.7/dist-packages/numpy/lib/function_base.py", line 1586, in _get_ufunc_and_otypes if func is self.pyfunc and self._ufunc is not None: AttributeError: 'vectorize' object has no attribute '_ufunc' OpenMP: Using 3 threads on a machine with 4 detected CPUs

jbednar commented 10 years ago

Thanks for the report! This issue was fixed in commit 663b4. Unfortunately, we have not had time to make a new PyPi/pip release of Topographica, but in the meantime you can either apply that patch to your copy, or can install the current version from github (See Cloning Topographica at https://github.com/ioam/topographica). Sorry about the trouble!

kalok87 commented 10 years ago

Dear Bednar,

Actually the version of my numpy is 1.8.1, and I also replace the cf.py with the new one from commit 663b4, but it does not work.

jbednar commented 10 years ago

I've tried the new Ubuntu 14.04 release, which has numpy 1.8.1 and doesn't show the above error when I use the github version of Topographica. However, it shows a new error that I think is entirely unrelated, having to do with saving snapshots: "ImportError: No module named _winreg". We don't use winreg for anything, so I'm trying to figure out where this error would come from...