G-Node / python-neo

Fork of python-neo for maintaining the NIX IO.
https://github.com/NeuralEnsemble/python-neo
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

NixIO is not supporting datetime attributes #6

Open JuliaSprenger opened 7 years ago

JuliaSprenger commented 7 years ago
import datetime
from neo.io.nixio import NixIO as NIO
from neo import Block

b = Block(name='block1',rec_datetime=datetime.datetime.now())

nio = NIO('testfile.nix')
nio.write_block(b)

results in

File "/home/julia/repositories/python/nixpy/nixio/value.py", line 71, in __init__
    raise TypeError("Invalid value type: {}".format(type(value)))
TypeError: Invalid value type: <type 'datetime.datetime'>