Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

TypeError: 'function' object is not iterable #171

Closed
reikdas opened this issue Oct 24, 2018 · 3 comments
Closed

TypeError: 'function' object is not iterable #171

reikdas opened this issue Oct 24, 2018 · 3 comments

Comments

@reikdas
Copy link
Collaborator

reikdas commented Oct 24, 2018

Some function calls seem to be failing in the master branch -

>>> f = uproot.recreate("tmp.root")
>>> f["name"] = numpy.histogram(numpy.random.normal(0, 1, 100000))
>>> f["name"].show()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pratyush/dev/uproot/uproot/write/TFile.py", line 181, in __getitem__
    return self._reopen()[where]
  File "/home/pratyush/dev/uproot/uproot/write/TFile.py", line 113, in _reopen
    return uproot.open(self._path, localsource=uproot.source.file.FileSource.defaults)
  File "/home/pratyush/dev/uproot/uproot/rootio.py", line 69, in open
    kwargs = dict(MemmapSource.defaults)
TypeError: 'function' object is not iterable

It is not a file writing issue - I read it back in ROOT.
I tried showstreamers() as well and it gave the same error.

@jpivarski
Copy link
Member

Some time ago, I changed MemmapSource.defaults (and all other .defaults) from being functions to being dicts. Oh— maybe the equivalent code in uproot.write.TFile.append has not been updated?

@reikdas
Copy link
Collaborator Author

reikdas commented Oct 25, 2018

I can take a look over the weekend. (Unless you are already working on it)

@jpivarski
Copy link
Member

I haven't been. (I have a stack of work on awkward-array, including a paper to write.)

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