"Unable to reflow" #407
-
Hello, I am trying to read tdb and write modified one. However I am getting "Unable to reflow" error. E.g.:
where cost507R.TDB is from OpenCalphad6 installation. The output is:
Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
This is a bug with how pycalphad writes out long numerical expressions and then attempts to add line breaks to make it fit within 80 characters (which used to be a hard limit in TC). I think we've fixed this bug in the latest development version, but if you can share the TDB file I can confirm. As a workaround until we confirm the bug is fixed and release a new version, try adding this to the top of your code to disable reflowing text: import pycalphad.io.tdb
pycalphad.io.tdb.reflow_text = lambda text, **kwargs: text
from pycalphad import Database
db = Database('cost507R.TDB')
db.to_file('cost507RW.TDB') I'm not sure if recent versions of TC or OC will accept files with long lines, but pycalphad should be able to read it back. |
Beta Was this translation helpful? Give feedback.
This is a bug with how pycalphad writes out long numerical expressions and then attempts to add line breaks to make it fit within 80 characters (which used to be a hard limit in TC). I think we've fixed this bug in the latest development version, but if you can share the TDB file I can confirm.
As a workaround until we confirm the bug is fixed and release a new version, try adding this to the top of your code to disable reflowing text:
I'm not sure if recent versions of TC or OC will accept files with long lines, but py…