Comments (7)
Just to clarify, this is a regression between 1.4.0 and 1.4.1, caused by this commit. Would be worth writing a test specifically to catch this when it's fixed.
On 1.4.0:
notedown --match fenced --run markdown/preface.markdown > build_ipynb/preface.ipynb
(no error)
On 1.4.1:
notedown --match fenced --run markdown/preface.markdown > build_ipynb/preface.ipynb
Traceback (most recent call last):
File "/Users/nuneziglesiasj/anaconda/envs/elegant/bin/notedown", line 9, in <module>
load_entry_point('notedown==1.4.1', 'console_scripts', 'notedown')()
File "/Users/nuneziglesiasj/anaconda/envs/elegant/lib/python3.4/site-packages/notedown/main.py", line 265, in cli
writer.write(notebook, codecs.getwriter('utf-8')(sys.stdout))
File "/Users/nuneziglesiasj/anaconda/envs/elegant/lib/python3.4/site-packages/ipython-3.1.0-py3.4.egg/IPython/nbformat/__init__.py", line 161, in write
fp.write(s)
File "/Users/nuneziglesiasj/anaconda/envs/elegant/lib/python3.4/codecs.py", line 374, in write
self.stream.write(data)
TypeError: must be str, not bytes
from notedown.
Thanks both.
@takluyver I've just imported from IPython since that's a strong dependency anyway.
@jni yes more tests would be great. I need to be a bit more vigilant about python 3. I don't use it everyday so simple things like this can slip through.
from notedown.
I've released 1.4.2 with this fix.
from notedown.
@aaren, thanks for the really quick fix!
I don't use it everyday
Maybe you should! I made the switch just a couple of months ago and I've been pretty happy. =)
from notedown.
@jni I'll switch once thesis is finished...
There is lots of good stuff in python 3 so I want to switch, but at the same time I can't afford to go into a conversion rabbit hole right now!
from notedown.
Be aware that that function is moving in the reorganisation for IPython/Jupyter 4.0. We've left it exposed at the old import location for backwards compatibility, so your fix should be fine through 4.x releases, but at some point we'll remove it from IPython.utils.io
. We're still discussing naming conventions for the new packages, but at present that's located in jupyter_nbconvert.utils.io
.
from notedown.
Thanks. When Jupyter is consolidated I'll switch to that.
from notedown.
Related Issues (20)
- error after adding c.NotebookApp.contents_manager_class = 'notedown.NotedownContentsManager' HOT 2
- Conda version not working: line 4, in <module> import notedown.main File "<frozen importlib._bootstrap>", line 971, in _find_and_load
- UnicodeDecodeError on Windows but not WSL
- Code blocks in markdown HOT 1
- pandoc is producing non-ascii characters
- UnicodeEncoderError when converting notebook containing Chinese characters HOT 4
- Integration with Jupyter HOT 4
- Issue with Tables due to Linewrap HOT 1
- Jupyter Lab: use markdown as its storage format HOT 2
- Markdown header is incorrectly broken into multiple lines (and displayed strangely) HOT 2
- 这个插件是不是不能兼容Python2.7啊 HOT 1
- Notedown fork: Knitty HOT 3
- Can't open .MD file correctly.
- notedown ignores comments in markdown
- pip install failed (format missing) HOT 1
- fedora 32 not install
- Error while saving file: foo.md display_priority.j2
- Invalid Syntax
- Used nbconverter template is deprecated now and throws an error
- What is the default chartset?
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 notedown.