Skip to content

"Unable to reflow" #407

Answered by richardotis
petrvokac asked this question in Q&A
Apr 12, 2022 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

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 py…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@bocklund
Comment options

@petrvokac
Comment options

Answer selected by bocklund
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants