Changeset 13925


Ignore:
Timestamp:
Nov 1, 2019 10:12:14 AM (3 weeks ago)
Author:
randersson
Message:

#5819 Testing a modification of r13890 to resolve issue with result entries being of type bytes.

Location:
PyFMI/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • PyFMI/trunk/CHANGELOG

    r13894 r13925  
    11--- CHANGELOG ---
     2
     3--- PyFMI-2.5.6 ---
     4    * Fixed such that instance attributes 'name' and 'raw_name' in class ResultDymolaBinary
     5      are now attributes that consists of strings instead of bytes in Python 3.
     6    * Fixed issue with set_string when input was a list of strings in Python 3.
     7    * Fixed other bytes/string incompabilities that caused exceptions with
     8      Python 3.
    29
    310--- PyFMI-2.5.5 ---
  • PyFMI/trunk/src/common/io.py

    r13894 r13925  
    11201120
    11211121        self.name = fmi_util.convert_array_names_list_names_int(name.view(np.int32))
     1122        self.name = [item.decode("utf8") if python3_flag and isinstance(item, bytes) else item for item in self.name]
    11221123        self.dataInfo = self.raw['dataInfo'].transpose()
    1123         self.name_lookup = {key:ind for ind,key in enumerate(self.name)}
     1124        self.name_lookup = {key.decode("utf8") if python3_flag and isinstance(item, bytes) else key:ind for ind,key in enumerate(self.name)}
    11241125       
    11251126        self._description = None
Note: See TracChangeset for help on using the changeset viewer.