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
Currently, when encoding==None, the encoding is determined to be JSON if the datatype is str and MsgPack if the datatype is bytes. This issue proposes to just try all of the parsers for datatypes supported by QCElemental, e.g.:
data = None
for parser in [yaml_parser, msgpack_parser, json_parser]:
try:
data = parser(blob)
break
except ParserError:
pass
else:
raise TypeError("Cannot parse blob")
Additionally, if parse_file cannot determine datatype, it should call parse_raw with encoding=None rather than raising.
The text was updated successfully, but these errors were encountered:
mattwelborn
changed the title
ProtoModel.parse_raw should try everything if encoding=None
ProtoModel.parse_raw should try everything if encoding==None
Aug 15, 2019
Currently, when
encoding==None
, the encoding is determined to be JSON if the datatype is str and MsgPack if the datatype is bytes. This issue proposes to just try all of the parsers for datatypes supported by QCElemental, e.g.:Additionally, if
parse_file
cannot determine datatype, it should callparse_raw
withencoding=None
rather than raising.This issue blocks MolSSI/QCEngine#136.
The text was updated successfully, but these errors were encountered: