Created
August 22, 2017 13:27
-
-
Save thomasaarholt/3abea975f74c1ac81411eab7b29b4b92 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------------------------------------------------------------------------- | |
TraitError Traceback (most recent call last) | |
<ipython-input-88-3fc0a0685cf7> in <module>() | |
----> 1 img, s = hs.load("8.bcf") | |
C:\ProgramData\Miniconda3\envs\35\lib\site-packages\hyperspy\io.py in load(filenames, signal_type, stack, stack_axis, new_axis_name, lazy, **kwds) | |
241 objects = [load_single_file(filename, lazy=lazy, | |
242 **kwds) | |
--> 243 for filename in filenames] | |
244 | |
245 if len(objects) == 1: | |
C:\ProgramData\Miniconda3\envs\35\lib\site-packages\hyperspy\io.py in <listcomp>(.0) | |
241 objects = [load_single_file(filename, lazy=lazy, | |
242 **kwds) | |
--> 243 for filename in filenames] | |
244 | |
245 if len(objects) == 1: | |
C:\ProgramData\Miniconda3\envs\35\lib\site-packages\hyperspy\io.py in load_single_file(filename, signal_type, **kwds) | |
284 reader=reader, | |
285 signal_type=signal_type, | |
--> 286 **kwds) | |
287 | |
288 | |
C:\ProgramData\Miniconda3\envs\35\lib\site-packages\hyperspy\io.py in load_with_reader(filename, reader, signal_type, **kwds) | |
302 if signal_type is not None: | |
303 signal_dict['metadata']["Signal"]['signal_type'] = signal_type | |
--> 304 objects.append(dict2signal(signal_dict, lazy=lazy)) | |
305 folder, filename = os.path.split(os.path.abspath(filename)) | |
306 filename, extension = os.path.splitext(filename) | |
C:\ProgramData\Miniconda3\envs\35\lib\site-packages\hyperspy\io.py in dict2signal(signal_dict, lazy) | |
417 signal_type=signal_type, | |
418 dtype=signal_dict['data'].dtype, | |
--> 419 lazy=lazy)(**signal_dict) | |
420 if signal._lazy: | |
421 signal._make_lazy() | |
C:\ProgramData\Miniconda3\envs\35\lib\site-packages\hyperspy\_signals\signal2d.py in __init__(self, *args, **kw) | |
237 | |
238 def __init__(self, *args, **kw): | |
--> 239 super().__init__(*args, **kw) | |
240 if self.axes_manager.signal_dimension != 2: | |
241 self.axes_manager.set_signal_dimension(2) | |
C:\ProgramData\Miniconda3\envs\35\lib\site-packages\hyperspy\signal.py in __init__(self, data, **kwds) | |
1586 self.learning_results = LearningResults() | |
1587 kwds['data'] = data | |
-> 1588 self._load_dictionary(kwds) | |
1589 self._plot = None | |
1590 self.inav = SpecialSlicersSignal(self, True) | |
C:\ProgramData\Miniconda3\envs\35\lib\site-packages\hyperspy\signal.py in _load_dictionary(self, file_data_dict) | |
1807 file_data_dict['axes'] = self._get_undefined_axes_list() | |
1808 self.axes_manager = AxesManager( | |
-> 1809 file_data_dict['axes']) | |
1810 if 'metadata' not in file_data_dict: | |
1811 file_data_dict['metadata'] = {} | |
C:\ProgramData\Miniconda3\envs\35\lib\site-packages\hyperspy\axes.py in __init__(self, axes_list) | |
576 obj : The AxesManager that the event belongs to. | |
577 """, arguments=['obj']) | |
--> 578 self.create_axes(axes_list) | |
579 # set_signal_dimension is called only if there is no current | |
580 # view. It defaults to spectrum | |
C:\ProgramData\Miniconda3\envs\35\lib\site-packages\hyperspy\axes.py in create_axes(self, axes_list) | |
759 axes_list.sort(key=lambda x: x['index_in_array']) | |
760 for axis_dict in axes_list: | |
--> 761 self._append_axis(**axis_dict) | |
762 | |
763 def _update_max_index(self): | |
C:\ProgramData\Miniconda3\envs\35\lib\site-packages\hyperspy\axes.py in _append_axis(self, *args, **kwargs) | |
802 | |
803 def _append_axis(self, *args, **kwargs): | |
--> 804 axis = DataAxis(*args, **kwargs) | |
805 axis.axes_manager = self | |
806 self._axes.append(axis) | |
C:\ProgramData\Miniconda3\envs\35\lib\site-packages\hyperspy\axes.py in __init__(self, size, index_in_array, name, scale, offset, units, navigate) | |
115 self.name = name | |
116 self.units = units | |
--> 117 self.scale = scale | |
118 self.offset = offset | |
119 self.size = size | |
C:\ProgramData\Miniconda3\envs\35\lib\site-packages\traits\trait_handlers.py in error(self, object, name, value) | |
171 """ | |
172 raise TraitError( object, name, self.full_info( object, name, value ), | |
--> 173 value ) | |
174 | |
175 def full_info ( self, object, name, value ): | |
TraitError: The 'scale' trait of a DataAxis instance must be a float, but a value of [8, 8937785.602709] <class 'list'> was specified. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment