Giter Club home page Giter Club logo

Comments (9)

kynan avatar kynan commented on August 26, 2024

@geggo Thanks for reporting this! I just did a simple test with a notebook with one code cell with some unicode text in a string and I didn't get any failures. Could you attach the notebook you get the failure with?

from nbstripout.

geggo avatar geggo commented on August 26, 2024

Thanks for looking at this issue. A simple notebook that shows the problem is: test_unicode.ipynb

from nbstripout.

kynan avatar kynan commented on August 26, 2024

Nope, sorry, works just fine for me (Python 2.7 on Linux x64). Could this be a Mac or Anaconda issue?

from nbstripout.

kynan avatar kynan commented on August 26, 2024

@geggo Tried with Anaconda too, no issue either. I'll add your notebook as a regression test, let's see what Travis has to say.

from nbstripout.

kynan avatar kynan commented on August 26, 2024

Aha, hang on! This is irritating! I do get the error iff I redirect the output to file, not if I just let it go to the terminal. How is that even possible? Redirection should be purely handled by the shell!

from nbstripout.

kynan avatar kynan commented on August 26, 2024

Your suggested fix works, so I'll pull that in, thanks for this!

from nbstripout.

kynan avatar kynan commented on August 26, 2024

@geggo: Released in 0.2.3!

from nbstripout.

takluyver avatar takluyver commented on August 26, 2024

For the record: redirection can make a difference because code can detect whether the output is a terminal or a pipe (this is how e.g. ls shows files in nice columns when used interactively). In Python's case, its guess of the encoding to use for output is different when output is being piped to a file.

from nbstripout.

kynan avatar kynan commented on August 26, 2024

@takluyver thanks for highlighting! I did read up on the topic after fixing this but failed to clarify.

from nbstripout.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.