I've come across this error in ver 2.0.4 but I think it wasn't a problem in earlier versions (not sure which one, sorry). I also tried updating to the version on github.
I was able to reproduce the issue on the public fafb instatnce. Thanks!
import pymaid
print(pymaid.version)
rm = pymaid.CatmaidInstance(server='https://fafb.catmaid.virtualflybrain.org/', api_token=None)
conn=pymaid.get_connectors(12240258) # This runs
conn=pymaid.get_connectors(12240258,relation_type='presynaptic_to') # This runs
conn=pymaid.get_connectors(12240258,relation_type='postsynaptic_to') # This raises error
Traceback (most recent call last):
File "/Users/akuan/repos/ppc_project_analysis/tracing_analysis/test.py", line 6, in
conn=pymaid.get_connectors(12240258,relation_type='postsynaptic_to') # This raises error
File "/Users/akuan/ppc_env/lib/python3.7/site-packages/pymaid/cache.py", line 316, in wrapper
res = function(*args, **kwargs)
File "/Users/akuan/ppc_env/lib/python3.7/site-packages/pymaid/fetch.py", line 1227, in get_connectors
'edition_time'])
File "/Users/akuan/ppc_env/lib/python3.7/site-packages/pandas/core/frame.py", line 490, in init
mgr = init_dict({}, index, columns, dtype=dtype)
File "/Users/akuan/ppc_env/lib/python3.7/site-packages/pandas/core/internals/construction.py", line 239, in init_dict
val = construct_1d_arraylike_from_scalar(np.nan, len(index), nan_dtype)
File "/Users/akuan/ppc_env/lib/python3.7/site-packages/pandas/core/dtypes/cast.py", line 1449, in construct_1d_arraylike_from_scalar
dtype = dtype.dtype
AttributeError: type object 'object' has no attribute 'dtype'
Ugh, sorry, I think i just figured it out. Looks like its an incompatibility with pandas ver. 1.0.1. Upgrading to pandas 1.2.4 seemed to fix the issue.
I've come across this error in ver 2.0.4 but I think it wasn't a problem in earlier versions (not sure which one, sorry). I also tried updating to the version on github.
I was able to reproduce the issue on the public fafb instatnce. Thanks!