Successfully import but can not even load example data, TypeError: 'generator' object is not an iterator

149 views
Skip to first unread message

Chongxi Lai

unread,
Aug 12, 2015, 8:06:02 AM8/12/15
to sima-users
In [1]:
import sima 
from sima.misc import example_data
dataset = sima.ImagingDataset.load(example_data())
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-1-f55eab7859a7> in <module>()
      1 import sima
      2 from sima.misc import example_data
----> 3 dataset = sima.ImagingDataset.load(example_data())

/Users/Chongxi/.local/lib/python2.7/site-packages/sima/imaging.pyc in load(cls, path)
    310             from sima.misc.convert import _load_version0
    311             # Load a read-only copy of the converted dataset
--> 312             ds = _load_version0(path)
    313             ds._read_only = True
    314             return ds

/Users/Chongxi/.local/lib/python2.7/site-packages/sima/misc/convert.pyc in _load_version0(path)
    110         dataset_dict = unpickler.load()
    111     iterables = dataset_dict.pop('iterables')
--> 112     sequences = [parse_sequence(seq) for seq in iterables]
    113 
    114     # Apply displacements if they exist

/Users/Chongxi/.local/lib/python2.7/site-packages/sima/misc/convert.pyc in parse_sequence(sequence)
    104     def parse_sequence(sequence):
    105         channels = [parse_channel(c) for c in sequence]
--> 106         return Sequence.join(*channels)
    107 
    108     with open(os.path.join(path, 'dataset.pkl'), 'rb') as f:

/Users/Chongxi/.local/lib/python2.7/site-packages/sima/sequence.pyc in join(*sequences)
    237 
    238         """
--> 239         return _Joined_Sequence(sequences)
    240 
    241     @classmethod

/Users/Chongxi/.local/lib/python2.7/site-packages/sima/sequence.pyc in __init__(self, sequences)
    723         for seq in sequences:
    724             if shape is None:
--> 725                 shape = seq.shape[:-1]
    726             if not shape == seq.shape[:-1]:
    727                 raise ValueError(

/Users/Chongxi/.local/lib/python2.7/site-packages/sima/sequence.pyc in shape(self)
    161     @property
    162     def shape(self):
--> 163         return (len(self),) + self._get_frame(0).shape
    164 
    165     def apply_displacements(self, displacements, frame_shape=None):

/Users/Chongxi/.local/lib/python2.7/site-packages/sima/sequence.pyc in __len__(self)
    535     def __len__(self):
    536         if self._len is None:
--> 537             self._len = sum(1 for _ in self)
    538         return self._len
    539 

/Users/Chongxi/.local/lib/python2.7/site-packages/sima/sequence.pyc in <genexpr>(***failed resolving arguments***)
    535     def __len__(self):
    536         if self._len is None:
--> 537             self._len = sum(1 for _ in self)
    538         return self._len
    539 

/Users/Chongxi/.local/lib/python2.7/site-packages/sima/sequence.pyc in __iter__(self)
    486                          for _ in range(self._num_channels)],
    487                         axis=2), 0)
--> 488                  for _ in range(self._num_planes)], 0)
    489 
    490     def _get_frame(self, n):

/Users/Chongxi/anaconda/lib/python2.7/site-packages/future/builtins/newnext.pyc in newnext(iterator, default)
     60             except AttributeError:
     61                 raise TypeError("'{0}' object is not an iterator".format(
---> 62                                            iterator.__class__.__name__))
     63     except StopIteration as e:
     64         if default is _SENTINEL:

TypeError: 'generator' object is not an iterator

Patrick Kaifosh

unread,
Aug 12, 2015, 8:24:05 AM8/12/15
to sima-users
What version of future do you have installed?

You can check this by running

>>> import future
>>> future.__version__

Chongxi GMail

unread,
Aug 12, 2015, 8:26:04 AM8/12/15
to Patrick Kaifosh, sima-users
In [1]: import future

In [2]: future.__version__
Out[2]: '0.15.0'

Thanks Patrick, it seems to be 0.15.0

Best,
Chongxi




--
You received this message because you are subscribed to a topic in the Google Groups "sima-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sima-users/c3Osd2TSZBo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sima-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sima-users/e41d6401-c1c4-41ff-9fc7-05b2a66f859c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Patrick Kaifosh

unread,
Aug 12, 2015, 8:50:54 AM8/12/15
to sima-users, pkai...@gmail.com
I can't reproduce the problem on my machine (the code runs fine there). But looking at the error message and surrounding code, I suspect that for some reason there is a problem when applying "next()" to the base_iter generator on line 485 of sequences.py

Do you have much experience with using pdb to figure out what is going on? It's very odd that neither .next() or .__next__() is working for the generator.

In general, this shouldn't be a problem if you are not constructing your sequences from TIFF stacks. For example, if you use hdf5 format, everything should be OK.

Chongxi GMail

unread,
Aug 12, 2015, 10:10:00 AM8/12/15
to Patrick Kaifosh, sima-users
The problem as you said rooted at this code:

def __iter__(self):
base_iter = self._iter_pages()
while True:
yield np.concatenate(
[np.expand_dims(
np.concatenate(
[np.expand_dims(next(base_iter), 2).astype(float)

for _ in range(self._num_channels)],
                    axis=2), 0)

for _ in range(self._num_planes)], 0)


Could you please tell me what does it do actually? Why do you need a generator here? 

I simply debug this and as you said, the problem is at next(base_iter)

Best,
Chongxi



--
You received this message because you are subscribed to a topic in the Google Groups "sima-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sima-users/c3Osd2TSZBo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sima-users+...@googlegroups.com.

Patrick Kaifosh

unread,
Aug 12, 2015, 10:18:09 AM8/12/15
to sima-...@googlegroups.com
This code rearranges the data into a single frame, formatted as required by SIMA, i.e. a numpy ndarray of shape (planes, rows, columns, channels). In general, you should be able to call next() on a generator. For some reason, that isn't working in your case. I would inspect base_iter and see if it has either a .next() or .__next__() method.
You received this message because you are subscribed to the Google Groups "sima-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sima-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sima-users/DB24651A-5FD9-492E-B919-FC265A11077E%40gmail.com.

Chongxi GMail

unread,
Aug 12, 2015, 10:18:20 AM8/12/15
to Patrick Kaifosh, sima-users
So I stop at line 481 and run the following code and get the error:

>>> base_iter
Out[8]: <generator object _iter_pages at 0x10aeb8910>
>>> [np.expand_dims(next(base_iter), 2).astype(float) for _ in range(self._num_channels)]
Traceback (most recent call last):
  File "/Users/Chongxi/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 3035, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-9-3f5cd79bde3e>", line 1, in <module>
    [np.expand_dims(next(base_iter), 2).astype(float) for _ in range(self._num_channels)]
  File "/Users/Chongxi/anaconda/lib/python2.7/site-packages/future/builtins/newnext.py", line 65, in newnext
    raise e
StopIteration

It seems that I get a base_iter, but the problem is in the newnext.py.

Best,
Chongxi

Chongxi GMail

unread,
Aug 12, 2015, 10:20:16 AM8/12/15
to Patrick Kaifosh, sima-...@googlegroups.com
The base_iter has a next() method. But when I run it, it gives me an error

>>> base_iter.next()
Traceback (most recent call last):
  File "/Users/Chongxi/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 3035, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-11-40e1af66eec9>", line 1, in <module>
    base_iter.next()
StopIteration

Best,
Chongxi





Chongxi GMail

unread,
Aug 12, 2015, 11:11:18 AM8/12/15
to Patrick Kaifosh, sima-...@googlegroups.com
Hi Patrick,

The problem is here:

def _iter_pages(self):
idx = 0
images = Image.open(self._path, 'r')
while True:
try:
images.seek(idx)
except EOFError:
break
else:
idx += 1
yield np.array(images).astype(float)
images.close()
Traceback (most recent call last):
  File "/Users/Chongxi/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 3035, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-20-435a0499eff5>", line 1, in <module>
    np.array(images,dtype=float)
  File "/Users/Chongxi/anaconda/lib/python2.7/site-packages/PIL/Image.py", line 512, in __getattr__
    raise AttributeError(name)
AttributeError: __float__

So the base_iter is not correctly generated. 

Could you please tell me what is supposedly correct for: yield np.array(images).astype(float)
What data structure has been yield here? 

Best,
Chongxi

Chongxi GMail

unread,
Aug 12, 2015, 12:05:07 PM8/12/15
to Patrick Kaifosh, sima-...@googlegroups.com
Also, another question is before I install the roiboddy to see any result. I need to install these 2 library right?

Chongxi@dhcp-172-17-193-27:~/anaconda/lib/python2.7/site-packages$ pip install http://guidata.googlecode.com/files/guidata-1.6.1.zip
    100% |████████████████████████████████| 438kB 9.4MB/s 
Installing collected packages: guidata
  Running setup.py install for guidata
Successfully installed guidata-1.6.1
Chongxi@dhcp-172-17-193-27:~/anaconda/lib/python2.7/site-packages$ pip install http://guiqwt.googlecode.com/files/guiqwt-2.3.1.zip
    100% |████████████████████████████████| 3.1MB 9.9MB/s 
Installing collected packages: guiqwt
  Running setup.py install for guiqwt
Successfully installed guiqwt-2.3.1

Chongxi GMail

unread,
Aug 12, 2015, 12:08:47 PM8/12/15
to Patrick Kaifosh, sima-...@googlegroups.com
According to this, it seems I install the roiboddy:

Chongxi@dhcp-172-17-193-27:~/anaconda/lib/python2.7/site-packages$ pip install roibuddy --user
Collecting roibuddy
  Using cached roibuddy-1.0.0-py2-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): guiqwt>=2.1.6 in /Users/Chongxi/anaconda/lib/python2.7/site-packages (from roibuddy)
Requirement already satisfied (use --upgrade to upgrade): guidata>=1.4.1 in /Users/Chongxi/anaconda/lib/python2.7/site-packages (from roibuddy)
Requirement already satisfied (use --upgrade to upgrade): sima in /Users/Chongxi/.local/lib/python2.7/site-packages (from roibuddy)
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.8 in /Users/Chongxi/anaconda/lib/python2.7/site-packages (from sima->roibuddy)
Requirement already satisfied (use --upgrade to upgrade): scipy>=0.13.0 in /Users/Chongxi/anaconda/lib/python2.7/site-packages (from sima->roibuddy)
Requirement already satisfied (use --upgrade to upgrade): scikit-image>=0.9.3 in /Users/Chongxi/anaconda/lib/python2.7/site-packages (from sima->roibuddy)
Requirement already satisfied (use --upgrade to upgrade): shapely>=1.2.14 in /Users/Chongxi/anaconda/lib/python2.7/site-packages (from sima->roibuddy)
Requirement already satisfied (use --upgrade to upgrade): scikit-learn>=0.11 in /Users/Chongxi/anaconda/lib/python2.7/site-packages (from sima->roibuddy)
Requirement already satisfied (use --upgrade to upgrade): pillow>=2.6.1 in /Users/Chongxi/anaconda/lib/python2.7/site-packages (from sima->roibuddy)
Requirement already satisfied (use --upgrade to upgrade): future>=0.14 in /Users/Chongxi/anaconda/lib/python2.7/site-packages (from sima->roibuddy)
Requirement already satisfied (use --upgrade to upgrade): matplotlib>=1.1.0 in /Users/Chongxi/anaconda/lib/python2.7/site-packages (from scikit-image>=0.9.3->sima->roibuddy)
Requirement already satisfied (use --upgrade to upgrade): six>=1.3 in /Users/Chongxi/anaconda/lib/python2.7/site-packages (from scikit-image>=0.9.3->sima->roibuddy)
Requirement already satisfied (use --upgrade to upgrade): networkx>=1.8 in /Users/Chongxi/anaconda/lib/python2.7/site-packages (from scikit-image>=0.9.3->sima->roibuddy)
Requirement already satisfied (use --upgrade to upgrade): python-dateutil in /Users/Chongxi/anaconda/lib/python2.7/site-packages (from matplotlib>=1.1.0->scikit-image>=0.9.3->sima->roibuddy)
Requirement already satisfied (use --upgrade to upgrade): pytz in /Users/Chongxi/anaconda/lib/python2.7/site-packages (from matplotlib>=1.1.0->scikit-image>=0.9.3->sima->roibuddy)
Requirement already satisfied (use --upgrade to upgrade): pyparsing>=1.5.6 in /Users/Chongxi/anaconda/lib/python2.7/site-packages (from matplotlib>=1.1.0->scikit-image>=0.9.3->sima->roibuddy)
Requirement already satisfied (use --upgrade to upgrade): nose>=0.11.1 in /Users/Chongxi/anaconda/lib/python2.7/site-packages (from matplotlib>=1.1.0->scikit-image>=0.9.3->sima->roibuddy)
Requirement already satisfied (use --upgrade to upgrade): mock in /Users/Chongxi/anaconda/lib/python2.7/site-packages (from matplotlib>=1.1.0->scikit-image>=0.9.3->sima->roibuddy)
Installing collected packages: roibuddy
Successfully installed roibuddy-1.0.0


But how do I start it? I could not find in the documentation how to start the roibuddy.

Best,
Chongxi

Chongxi GMail

unread,
Aug 12, 2015, 1:36:44 PM8/12/15
to Patrick Kaifosh, sima-...@googlegroups.com
Hi Patrick,

I’ve been confused by this. Have anyone use this library under “Mac OS X + anaconda python 2.7.10”?

Even the installation log said everything is installed, I still could not run your example.

Best,
Chongxi

Patrick Kaifosh

unread,
Aug 13, 2015, 8:55:29 AM8/13/15
to Chongxi GMail, sima-...@googlegroups.com
Hi Chongxi,

On some operating systems, you can just type "roibuddy" into the terminal.

I've head that sometimes that doesn't work. In that case, go to the
location where roibuddy is installed (e.g.
/Users/Chongxi/anaconda/lib/python2.7/site-packages/roibuddy/) and then
run "python roi_buddy.py"

Patrick

Chongxi GMail wrote:
> Hi Patrick,
>
> I’ve been confused by this. Have anyone use this library under “Mac OS
> X + anaconda python 2.7.10”?
>
> Even the installation log said everything is installed, I still could
> not run your example.
>
> Best,
> Chongxi
>
>
>
>> On Aug 12, 2015, at 5:08 PM, Chongxi GMail <chong...@gmail.com
>>> <mailto:chong...@gmail.com>> wrote:
>>>
>>> Also, another question is before I install the roiboddy to see any
>>> result. I need to install these 2 library right?
>>>
>>> Chongxi@dhcp-172-17-193-27:~/anaconda/lib/python2.7/site-packages$
>>> pip install http://guidata.googlecode.com/files/guidata-1.6.1.zip
>>> Collecting http://guidata.googlecode.com/files/guidata-1.6.1.zip
>>> Downloading http://guidata.googlecode.com/files/guidata-1.6.1.zip
>>> (434kB)
>>> 100% |████████████████████████████████| 438kB 9.4MB/s
>>> Installing collected packages: guidata
>>> Running setup.py install for guidata
>>> Successfully installed guidata-1.6.1
>>> Chongxi@dhcp-172-17-193-27:~/anaconda/lib/python2.7/site-packages$
>>> pip install http://guiqwt.googlecode.com/files/guiqwt-2.3.1.zip
>>> Collecting http://guiqwt.googlecode.com/files/guiqwt-2.3.1.zip
>>> Downloading http://guiqwt.googlecode.com/files/guiqwt-2.3.1.zip
>>> (3.1MB)
>>> 100% |████████████████████████████████| 3.1MB 9.9MB/s
>>> Installing collected packages: guiqwt
>>> Running setup.py install for guiqwt
>>> Successfully installed guiqwt-2.3.1
>>>
>>>
>>>> On Aug 12, 2015, at 4:11 PM, Chongxi GMail <chong...@gmail.com
>>>>> <mailto:chong...@gmail.com>> wrote:
>>>>>
>>>>> The base_iter has a next() method. But when I run it, it gives me
>>>>> an error
>>>>>
>>>>> >>> base_iter.next()
>>>>> Traceback (most recent call last):
>>>>> File
>>>>> "/Users/Chongxi/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.py",
>>>>> line 3035, in run_code
>>>>> exec(code_obj, self.user_global_ns, self.user_ns)
>>>>> File "<ipython-input-11-40e1af66eec9>", line 1, in <module>
>>>>> base_iter.next()
>>>>> StopIteration
>>>>>
>>>>> Best,
>>>>> Chongxi
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> On Aug 12, 2015, at 3:18 PM, Patrick Kaifosh <pkai...@gmail.com
>>>>>>>> <pkai...@gmail.com <mailto:pkai...@gmail.com>> wrote:
>>>>>>>>
>>>>>>>> I can't reproduce the problem on my machine (the code runs fine
>>>>>>>> there). But looking at the error message and surrounding code,
>>>>>>>> I suspect that for some reason there is a problem when applying
>>>>>>>> "next()" to the base_iter generator on line 485 of sequences.py
>>>>>>>>
>>>>>>>> Do you have much experience with using pdb to figure out what
>>>>>>>> is going on? It's very odd that neither .next() or .__next__()
>>>>>>>> is working for the generator.
>>>>>>>>
>>>>>>>> In general, this shouldn't be a problem if you are not
>>>>>>>> constructing your sequences from TIFF stacks. For example, if
>>>>>>>> you use hdf5 format, everything should be OK.
>>>>>>>>
>>>>>>>> --
>>>>>>>> You received this message because you are subscribed to a topic
>>>>>>>> in the Google Groups "sima-users" group.
>>>>>>>> To unsubscribe from this topic, visit
>>>>>>>> https://groups.google.com/d/topic/sima-users/c3Osd2TSZBo/unsubscribe.
>>>>>>>> To unsubscribe from this group and all its topics, send an
>>>>>>>> email to sima-users+...@googlegroups.com
>>>>>>>> <mailto:sima-users+...@googlegroups.com>.
>>>>>>>> <https://groups.google.com/d/msgid/sima-users/c4618efc-989a-40c9-bbb0-811b3469f8e7%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to the
>>>>>>> Google Groups "sima-users" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from
>>>>>>> it, send an email to sima-users+...@googlegroups.com
>>>>>>> <mailto:sima-users+...@googlegroups.com>.
>>>>>>> To view this discussion on the web visit
>>>>>>> https://groups.google.com/d/msgid/sima-users/DB24651A-5FD9-492E-B919-FC265A11077E%40gmail.com
>>>>>>> <https://groups.google.com/d/msgid/sima-users/DB24651A-5FD9-492E-B919-FC265A11077E%40gmail.com?utm_medium=email&utm_source=footer>.
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to a topic
>>>>>> in the Google Groups "sima-users" group.
>>>>>> To unsubscribe from this topic, visit
>>>>>> https://groups.google.com/d/topic/sima-users/c3Osd2TSZBo/unsubscribe.
>>>>>> To unsubscribe from this group and all its topics, send an email
>>>>>> to sima-users+...@googlegroups.com
>>>>>> <mailto:sima-users+...@googlegroups.com>.
>>>>>> To view this discussion on the web visit
>>>>>> https://groups.google.com/d/msgid/sima-users/55CB559F.8030407%40gmail.com
>>>>>> <https://groups.google.com/d/msgid/sima-users/55CB559F.8030407%40gmail.com?utm_medium=email&utm_source=footer>.

Patrick Kaifosh

unread,
Aug 13, 2015, 8:58:12 AM8/13/15
to sima-...@googlegroups.com
Hi Chongxi,

Thanks for working on debugging this.

Your error message complains about this code
np.array(images,dtype=float)
which is a bit different from the line of code that we have:
np.array(images).astype(float)

Does the line of code bellow also cause the same problem?

Do you have the standard PIL installed (not recommended) or do you have
pillow installed (recommended)? If you have pillow installed, the
following code should run:

>>> import PIL
>>> PIL.PILLOW_VERSION

Thanks,
Patrick
>> <mailto:chong...@gmail.com>> wrote:
>>
>> The base_iter has a next() method. But when I run it, it gives me an
>> error
>>
>> >>> base_iter.next()
>> Traceback (most recent call last):
>> File
>> "/Users/Chongxi/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.py",
>> line 3035, in run_code
>> exec(code_obj, self.user_global_ns, self.user_ns)
>> File "<ipython-input-11-40e1af66eec9>", line 1, in <module>
>> base_iter.next()
>> StopIteration
>>
>> Best,
>> Chongxi
>>
>>
>>
>>
>>
>>> On Aug 12, 2015, at 3:18 PM, Patrick Kaifosh <pkai...@gmail.com
>>>>> <mailto:pkai...@gmail.com>> wrote:
>>>>>
>>>>> I can't reproduce the problem on my machine (the code runs fine
>>>>> there). But looking at the error message and surrounding code, I
>>>>> suspect that for some reason there is a problem when applying
>>>>> "next()" to the base_iter generator on line 485 of sequences.py
>>>>>
>>>>> Do you have much experience with using pdb to figure out what is
>>>>> going on? It's very odd that neither .next() or .__next__() is
>>>>> working for the generator.
>>>>>
>>>>> In general, this shouldn't be a problem if you are not
>>>>> constructing your sequences from TIFF stacks. For example, if you
>>>>> use hdf5 format, everything should be OK.
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to a topic in
>>>>> the Google Groups "sima-users" group.
>>>>> To unsubscribe from this topic, visit
>>>>> https://groups.google.com/d/topic/sima-users/c3Osd2TSZBo/unsubscribe.
>>>>> To unsubscribe from this group and all its topics, send an email
>>>>> to sima-users+...@googlegroups.com
>>>>> <mailto:sima-users+...@googlegroups.com>.
>>>>> <https://groups.google.com/d/msgid/sima-users/c4618efc-989a-40c9-bbb0-811b3469f8e7%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "sima-users" group.
>>>> To unsubscribe from this group and stop receiving emails from it,
>>>> send an email to sima-users+...@googlegroups.com
>>>> <mailto:sima-users+...@googlegroups.com>.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/sima-users/DB24651A-5FD9-492E-B919-FC265A11077E%40gmail.com
>>>> <https://groups.google.com/d/msgid/sima-users/DB24651A-5FD9-492E-B919-FC265A11077E%40gmail.com?utm_medium=email&utm_source=footer>.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>> --
>>> You received this message because you are subscribed to a topic in
>>> the Google Groups "sima-users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/sima-users/c3Osd2TSZBo/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> sima-users+...@googlegroups.com
>>> <mailto:sima-users+...@googlegroups.com>.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/sima-users/55CB559F.8030407%40gmail.com
>>> <https://groups.google.com/d/msgid/sima-users/55CB559F.8030407%40gmail.com?utm_medium=email&utm_source=footer>.
>>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "sima-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to sima-users+...@googlegroups.com
> <mailto:sima-users+...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sima-users/65F93B2E-EF0B-47D5-9AD1-1911B1CAC273%40gmail.com
> <https://groups.google.com/d/msgid/sima-users/65F93B2E-EF0B-47D5-9AD1-1911B1CAC273%40gmail.com?utm_medium=email&utm_source=footer>.

Chongxi GMail

unread,
Aug 13, 2015, 9:30:23 AM8/13/15
to Patrick Kaifosh, sima-...@googlegroups.com
Thanks Patrick,

Now I uninstall the PIL and reinstall the pillow, here is my pillow version, and it is working now without roibuddy.

In [1]: import PIL

In [2]: PIL.PILLOW_VERSION
Out[2]: ‘2.9.0'


I can load the example data now but I am still very confused about how to visualize it. Does that need roibuddy? 

It reminds me that I need Qwt5 under PyQt4 module. However, I use anaconda Mac OS X version, its PyQt4 module does not has Qwt5. Could you recommend a PyQt4 library that contains Qwt5 under Mac OS X for anaconda python 2.7.10? 

Chongxi@fileindexdrives:~/.local/lib/python2.7/site-packages/ROIBuddy$ python roi_buddy.py
/Users/Chongxi/anaconda/lib/python2.7/site-packages/skimage/filter/__init__.py:6: skimage_deprecation: The `skimage.filter` module has been renamed to `skimage.filters`.  This placeholder module will be removed in v0.13.
  warn(skimage_deprecation('The `skimage.filter` module has been renamed '
Traceback (most recent call last):
  File "roi_buddy.py", line 34, in <module>
    import guiqwt.baseplot
  File "/Users/Chongxi/anaconda/lib/python2.7/site-packages/guiqwt/baseplot.py", line 60, in <module>
    from guiqwt.transitional import (QwtPlot, QwtLinearScaleEngine,
  File "/Users/Chongxi/anaconda/lib/python2.7/site-packages/guiqwt/transitional.py", line 19, in <module>
    from PyQt4.Qwt5 import (QwtPlot, QwtSymbol, QwtLinearScaleEngine,
ImportError: No module named Qwt5

Best,
Chongxi



To unsubscribe from this group and all its topics, send an email to sima-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sima-users/55CC9463.5050106%40gmail.com.

Patrick Kaifosh

unread,
Aug 13, 2015, 9:39:33 AM8/13/15
to Chongxi GMail, sima-...@googlegroups.com
OK. So it looks, like the problem was that PIL was installed and not pillow.

Let's then consider this issue to be resolved. Can you please start a
different thread for your other questions so that we keep things nice
and organized for other people searching through the forum history. Thanks.
Reply all
Reply to author
Forward
0 new messages