Comments (2)
Dear Masashi,
Thank you for bringing this to my attention.
In the newest versions of the 3.x branch, the Entry.write_to_file()
(and Entry.format()
) functions support these arguments:
show_comments
: Set to True/False to show/hide the comments before certain saveframesskip_empty_loops
Set to True/False to omit/print loops that have no tag values for any tag at all.skip_empty_tags
Set to True/False to omit/print tags without values
Due to an oversight, the library had a default value of True
for skip_empty_tags
for Entry.write_to_file()
which is what caused the behavior you experienced. I changed the default value to False
in 3.0.6 (just released) to address this. At the same time, you can get the desired behavior by setting skip_empty_tags=False
in earlier 3.0.x releases without upgrading.
On the other hand, I cannot reproduce the error in the newest 2.x release, and that branch does not support the skip_empty_tags
argument at all - all tags should always be printed. Can you provide the output file, and code to generate the output file from this input file that is omitting the tags on version 2.6.5.1?
Best,
Jon
from pynmrstar.
Dear Jon,
Thank you for your kind support.
Then, I found a bug in my application that did the unexpected data manipulation.
Sorry for bothering you with this. This tickect is to be closed.
BTW, I always use skip_empty_tags=False in case v3 for our requirement.
Best regards,
Masashi
from pynmrstar.
Related Issues (20)
- Files without categories read ok HOT 2
- loop with no data warnings HOT 3
- A typo in error message HOT 2
- pynmrstar library should not use logging.basicConfig HOT 3
- odd behaviour of frame_codes HOT 2
- pynmrstar should use its own logger?! HOT 4
- get Loop tags without category HOT 5
- read rows in loops as a dictionary HOT 11
- should PyNMRSTAR describe itself as a star file parser HOT 7
- running the tests fails with missing file naughty-strings/blns.json HOT 1
- tests fail with missing file /naughty-strings/blns.json HOT 3
- Is uniform indenting possible HOT 5
- changing the category of a frame corrupts the sf_category tag HOT 2
- Show a better error message when a user attempts to render a file with an empty string
- Release 3? HOT 4
- When validating an entry, ensure that saveframe pointers point to saveframes of the correct category HOT 2
- If loading an entry fails with a 403, implement an exponential back off and retry rather than throwing an IOError
- Change write_to_file() defaults to preserve empty tags and loops HOT 1
- Problem frame without tags won't print loop HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pynmrstar.