The code in question is just 2 lines used to import the "COST507 database for light alloys" (downloaded from the opencalphad homepage http://www.opencalphad.com/).
from pycalphad import Database
db = Database('COST507.tdb')
This is the error it returns:
Failed while parsing: ELEMENT Y HCP_A3 8.89059+01 5.9664E+03 4.4434E+01
Tokens: None
---------------------------------------------------------------------------
ParseException Traceback (most recent call last)
<ipython-input-6-84bd58f009b2> in <module>
1 from pycalphad import Database
----> 2 db = Database('COST507.tdb')
~\Anaconda3\envs\pycalphad_env\lib\site-packages\pycalphad\io\database.py in __new__(cls, *args)
127 elif fname.find('\n') == -1:
128 # Single-line string; it's probably a filename
--> 129 return cls.from_file(fname, fmt=fmt)
130 else:
131 # Newlines found: probably a full database string
~\Anaconda3\envs\pycalphad_env\lib\site-packages\pycalphad\io\database.py in from_file(fname, fmt)
221 try:
222 dbf = Database()
--> 223 format_registry[fmt.lower()].read(dbf, fd)
224 finally:
225 # Close file descriptors created in this routine
~\Anaconda3\envs\pycalphad_env\lib\site-packages\pycalphad\io\tdb.py in read_tdb(dbf, fd)
911 tokens = None
912 try:
--> 913 tokens = _tdb_grammar().parseString(command)
914 _TDB_PROCESSOR[tokens[0]](dbf, *tokens[1:])
915 except ParseException:
~\Anaconda3\envs\pycalphad_env\lib\site-packages\pyparsing.py in parseString(self, instring, parseAll)
1953 if getattr(exc, '__traceback__', None) is not None:
1954 exc.__traceback__ = self._trim_traceback(exc.__traceback__)
-> 1955 raise exc
1956 else:
1957 return tokens
~\Anaconda3\envs\pycalphad_env\lib\site-packages\pyparsing.py in parseImpl(self, instring, loc, doActions)
3782 return loc + 1, "\n"
3783 else:
-> 3784 raise ParseException(instring, loc, self.errmsg, self)
3785 elif loc == len(instring):
3786 return loc + 1, []
ParseException: Expected {{"ELEMENT" W:(ABCD...) [Suppress:(W:(ABCD...))] [Suppress:({Re:('[-+]?([0-9]+\\.(?!([0-9]|[eE])))|([0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?)')}...)] LineEnd} | {"SPECIES" W:(ABCD...) [Suppress:("%")] Group:({{W:(ABCD...) [Re:('[-+]?([0-9]+\\.(?!([0-9]|[eE])))|([0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?)')]}}...) [{Suppress:("/") W:(+-01...)}] LineEnd} | {"TYPE_DEFINITION" Suppress:(<SP><TAB><CR><LF>) !W:( !) SkipTo:(LineEnd)} | {"FUNCTION" W:(ABCD...) {{Re:('[-+]?([0-9]+\\.(?!([0-9]|[eE])))|([0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?)') | [","]...} {{SkipTo:(";") Suppress:(";") [Suppress:(",")]... [Re:('[-+]?([0-9]+\\.(?!([0-9]|[eE])))|([0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?)')] Suppress:({W:(YNyn) | <SP><TAB><CR><LF>})}}...}} | {"ASSESSED_SYSTEMS" SkipTo:(LineEnd)} | {"DEFINE_SYSTEM_DEFAULT" SkipTo:(LineEnd)} | {"DEFAULT_COMMAND" SkipTo:(LineEnd)} | {"DATABASE_INFO" SkipTo:(LineEnd)} | {"VERSION_DATE" SkipTo:(LineEnd)} | {"REFERENCE_FILE" SkipTo:(LineEnd)} | {"ADD_REFERENCES" SkipTo:(LineEnd)} | {"LIST_OF_REFERENCES" SkipTo:(LineEnd)} | {"TEMPERATURE_LIMITS" SkipTo:(LineEnd)} | {"PHASE" W:(ABCD...) Suppress:(<SP><TAB><CR><LF>) !W:( !) Suppress:(<SP><TAB><CR><LF>) Suppress:(W:(0123...)) Group:({Re:('[-+]?([0-9]+\\.(?!([0-9]|[eE])))|([0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?)')}...) LineEnd} | {"CONSTITUENT" W:(ABCD...) Suppress:(<SP><TAB><CR><LF>) Suppress:(":") Group:(Group:({{[Suppress:(",")] {W:(ABCD...) [Suppress:("%")]}}}...) [: Group:({{[Suppress:(",")] {W:(ABCD...) [Suppress:("%")]}}}...)]...) Suppress:(":") LineEnd} | {"PARAMETER" {"BMAGN" | "DF" | "DQ" | "G" | "GD" | "L" | "MF" | "MQ" | "NT" | "TC" | "THETA" | "V0" | "VS"} Suppress:("(") W:(ABCD...) [{Suppress:("&") W:(ABCD...)}] Suppress:(",") Group:(Group:({{[Suppress:(",")] {W:(ABCD...) [Suppress:("%")]}}}...) [: Group:({{[Suppress:(",")] {W:(ABCD...) [Suppress:("%")]}}}...)]...) [{Suppress:(";") W:(0123...)}] Suppress:(")") {{Re:('[-+]?([0-9]+\\.(?!([0-9]|[eE])))|([0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?)') | [","]...} {{SkipTo:(";") Suppress:(";") [Suppress:(",")]... [Re:('[-+]?([0-9]+\\.(?!([0-9]|[eE])))|([0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?)')] Suppress:({W:(YNyn) | <SP><TAB><CR><LF>})}}...}}}, found '+' (at char 25), (line:1, col:26)
```