Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3D tracking tutorial: problem loading zipfile stack #37

Open
nkeim opened this issue Nov 24, 2015 · 3 comments
Open

3D tracking tutorial: problem loading zipfile stack #37

nkeim opened this issue Nov 24, 2015 · 3 comments

Comments

@nkeim
Copy link
Contributor

nkeim commented Nov 24, 2015

When I launch the 3D tracking example in Binder, running the 2nd cell (the one that loads the image stack) raises

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-2-5046be688d14> in <module>()
----> 1 frames = pims.ImageSequenceND(r'../sample_data/pmma_colloids.zip', axes_identifiers = ['z', 't'])
      2 frames.bundle_axes = ['z', 'y', 'x']
      3 frames.iter_axes = 't'
      4 frames

/home/main/anaconda/envs/binder/lib/python3.4/site-packages/pims/image_sequence.py in __init__(self, path_spec, process_func, dtype, as_grey, plugin, axes_identifiers)
    297         self.axes_identifiers = axes_identifiers
    298         super(ImageSequenceND, self).__init__(path_spec, process_func,
--> 299                                               dtype, as_grey, plugin)
    300         shape = self._first_frame_shape
    301         if len(shape) == 2:

/home/main/anaconda/envs/binder/lib/python3.4/site-packages/pims/image_sequence.py in __init__(self, path_spec, process_func, dtype, as_grey, plugin)
     93         self._get_files(path_spec)
     94 
---> 95         tmp = self.imread(self._filepaths[0], **self.kwargs)
     96         self._first_frame_shape = tmp.shape
     97 

/home/main/anaconda/envs/binder/lib/python3.4/site-packages/pims/image_sequence.py in imread(self, filename, **kwargs)
    118                               "scipy, matplotlib or scikit-image.")
    119         if self._is_zipfile:
--> 120             file_handle = StringIO(self._zipfile.read(filename))
    121             return imread(file_handle, **kwargs)
    122         else:

TypeError: initial_value must be str or None, not bytes
@danielballan
Copy link
Member

This is a Python 3 issue. I discovered the same thing when overhauling trackpy-examples in the py3 env. (Happily, no other notebooks revealed py3 issues in our packages.) I fixed it here: soft-matter/pims#199 but the last release of pims doesn't have the fix.

Seems like we need slicerator and pims releases pretty soon. Any other blockers?

@caspervdw
Copy link
Member

What do you mean by blockers?

I wanted to have a good look at plot_to_frame and circumvent PIL mainly
to increase performance and also to solve the 3.0.0 incompatibility issue.

2015-11-24 16:22 GMT+01:00 Dan Allan notifications@github.com:

This is a Python 3 issue. I discovered the same thing when overhauling
trackpy-examples in the py3 env. (Happily, no other notebooks revealed py3
issues in our packages.) I fixed it here: soft-matter/pims#199
soft-matter/pims#199 but the last release of
pims doesn't have the fix.

Seems like we need slicerator and pims releases pretty soon. Any other
blockers?


Reply to this email directly or view it on GitHub
#37 (comment)
.

@danielballan
Copy link
Member

What do you mean by blockers?

I meant issues/PRs to close before we tag a bug-fix release. I'm fine waiting for plot_to_frame to be ready.

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

No branches or pull requests

3 participants