Unable to remove `lines_to_next_cell` metadata
See original GitHub issueIf I have the following global configs:
c.NotebookApp.contents_manager_class = "jupytext.TextFileContentsManager"
c.ContentsManager.freeze_metadata = True
When I open a .py
script that has the following content:
import os
print('hello1')
print('hello2')
Then hit the button “Save and Checkpoint” in the browser interface and open the script again in a text editor, the new content of the script is:
# + {"lines_to_next_cell": 2}
import os
# -
print('hello1')
# + {"lines_to_next_cell": 2}
print('hello2')
I’ve also tried to have in the global configs the following:
c.NotebookApp.contents_manager_class = "jupytext.TextFileContentsManager"
c.ContentsManager.freeze_metadata = True
c.ContentsManager.default_cell_metadata_filter = "-lines_to_next_cell"
But the behavior is still the same.
Shouldn’t the c.ContentsManager.freeze_metadata
option save no metadata at all when the original files have no metadata?
If not, how can I remove the lines_to_next_cell
metadata in this scenario?
Thanks in advance!
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
How to Easily Remove Metadata from Files via File Explorer
Windows: How to Easily Remove Metadata from Files via File Explorer · Go to File Explorer · Select one or more files in...
Read more >unable to remove properties and personal information ...
Unable to remove properties and personal information from video files because that is missing. was there the other day but is missing now....
Read more >Cannot remove data from user_metadata with service role via ...
I expected being able to delete properties from the user_metadata object. I certainly should not have to edit the auth.users table row directly ......
Read more >52456 - Unconfigure fails with message, "Unable to delete the ...
System Reported Fixed* Reported Fixed*
Microsoft® Windows® for x64 5.1 6.1 9.3 TS1M1 9.4 TS1M0
Microsoft Windows Server 2003 Datacenter Edition 5.1 9.3 TS1M1
Microsoft Windows...
Read more >Is it possible to remove metadata by installing a newer version ...
To remove metadata from installed org, you need to use destructive changes with Ant/Workbench(or similar tool).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Andre, there was indeed an issue with the combination of the user and the default filter. The fix is on its way. What I advice for now is that you remove the default cell metadata filter filter (as, anyway the metadata
lines_to_next_cell
is not expected to go to the text representation anymore).Hello Andre, Thanks for reporting this - this is clearly not intended !
For the next release I have been thinking of removing the
freeze_metadata
option and instead provide a better handling by default of scripts with no metadata (and, as you expect, add no metadata in that case - see also #124).I am not in a position to test your example right now, but I will later on. Meanwhile, you may want to edit the metadata filter manually (in the notebook metadata), or give a try to the following configuration,