You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am interested in using mocpy, but rather would like to work in python 3.4 rather than in 2.7. I have a MOC file that I am trying to read. In python 2.7 it works fine:
Python 2.7.11 (default, Dec 5 2015, 23:51:51)
Type "copyright", "credits" or "license" for more information.
IPython 4.0.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: from mocpy import MOC
In [2]: mc = MOC.from_file('/Users/haussel/Downloads/Herschel-Stripe-82_MOC.fits’)
In python 3.4 I get the following error:
Python 3.4.4 (default, Dec 21 2015, 04:54:59)
Type "copyright", "credits" or "license" for more information.
IPython 4.0.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: from mocpy import MOC
In [2]: mc = MOC.from_file('/Users/haussel/Downloads/Herschel-Stripe-82_MOC.fits')
TypeError Traceback (most recent call last)
in ()
----> 1 mc = MOC.from_file('/Users/haussel/Downloads/Herschel-Stripe-82_MOC.fits')
/Users/haussel/Library/Python/3.4/lib/python/site-packages/mocpy/moc.py in read_local(path)
492 Read a MOC on the local file system
493 """
--> 494 return MOC_io.__parse(path)
495
496
/Users/haussel/Library/Python/3.4/lib/python/site-packages/mocpy/moc.py in from_uniq_interval_set(cls, uniq_is)
336
337 if order != last_order:
--> 338 r = r.union(rtmp)
339 rtmp.clear()
340 last_order = order
/Users/haussel/Library/Python/3.4/lib/python/site-packages/mocpy/interval_set.py in merge_intervals(intervals)
47 ret = []
48 start = stop = None
---> 49 for itv in sorted(intervals):
50 if start is None:
51 start, stop = itv
Hello,
I am interested in using mocpy, but rather would like to work in python 3.4 rather than in 2.7. I have a MOC file that I am trying to read. In python 2.7 it works fine:
Python 2.7.11 (default, Dec 5 2015, 23:51:51)
Type "copyright", "credits" or "license" for more information.
IPython 4.0.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: from mocpy import MOC
In [2]: mc = MOC.from_file('/Users/haussel/Downloads/Herschel-Stripe-82_MOC.fits’)
In python 3.4 I get the following error:
Python 3.4.4 (default, Dec 21 2015, 04:54:59)
Type "copyright", "credits" or "license" for more information.
IPython 4.0.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: from mocpy import MOC
In [2]: mc = MOC.from_file('/Users/haussel/Downloads/Herschel-Stripe-82_MOC.fits')
TypeError Traceback (most recent call last)
in ()
----> 1 mc = MOC.from_file('/Users/haussel/Downloads/Herschel-Stripe-82_MOC.fits')
/Users/haussel/Library/Python/3.4/lib/python/site-packages/mocpy/moc.py in from_file(cls, local_path)
204 @classmethod
205 def from_file(cls, local_path):
--> 206 return MOC_io.read_local(local_path)
207
208
/Users/haussel/Library/Python/3.4/lib/python/site-packages/mocpy/moc.py in read_local(path)
492 Read a MOC on the local file system
493 """
--> 494 return MOC_io.__parse(path)
495
496
/Users/haussel/Library/Python/3.4/lib/python/site-packages/mocpy/moc.py in __parse(path)
508
509
--> 510 return MOC.from_uniq_interval_set(interval_set)
511
512
/Users/haussel/Library/Python/3.4/lib/python/site-packages/mocpy/moc.py in from_uniq_interval_set(cls, uniq_is)
336
337 if order != last_order:
--> 338 r = r.union(rtmp)
339 rtmp.clear()
340 last_order = order
/Users/haussel/Library/Python/3.4/lib/python/site-packages/mocpy/interval_set.py in union(self, another_is)
106 """
107 interval_set = IntervalSet()
--> 108 interval_set._intervals = IntervalSet.merge_intervals(self.intervals + another_is.intervals)
109
110 return interval_set
/Users/haussel/Library/Python/3.4/lib/python/site-packages/mocpy/interval_set.py in merge_intervals(intervals)
47 ret = []
48 start = stop = None
---> 49 for itv in sorted(intervals):
50 if start is None:
51 start, stop = itv
TypeError: unorderable types: float() < NoneType()
The text was updated successfully, but these errors were encountered: