Coder Social home page Coder Social logo

Comments (15)

gepcel avatar gepcel commented on September 23, 2024

It seems that the nbconvert the single quote character to ', and this plugin convert the ' to '.

Anyone know if it's true? Or even better how to fix that ?

from pelican-jupyter.

danielfrg avatar danielfrg commented on September 23, 2024

The plugin is not converting ' to ' intentionally, also note that this plugin is using nbconvert, which is included in ipython 1.0

Can you give more information? like which versions you are using and a simple example of a notebook that generates the wrong output so I can test it.

from pelican-jupyter.

gepcel avatar gepcel commented on September 23, 2024

Thank you for responding.
I'm using Python 3.3.4, ipython 1.1.0, pelican 3.3.0, (installed through miniconda 3.3.0.5).

An example is one of my blog. I'm not sure if the Chinese language displays well on your computer, but just focus on the output of the ipython code cell In[1].

Here is the html file, and the original ipynb file here. I also uploaded an html file here converted by ipython nbconvert to show the difference.

from pelican-jupyter.

gepcel avatar gepcel commented on September 23, 2024

It appears that the single quote is translated twice.But after digging
into ipython nbconvert and pelican' for several days, I still couldn't find where the second translate happens. As far as I can tell, the first translate is accomplished bynbconvert`.

Maybe I should just throw this thing away and learn some about debugging,
since I knew nearly nothing about that.

Look, I opened an issue just primely because I thought you might help since
you make such a wonderful plugin.

Sorry for bothering.

Daniel Rodriguez [email protected]于2014年3月10日星期一写道:

The plugin is not converting ' to ' intentionally, also
note that this plugin is using nbconvert, which is included in ipython 1.0

Can you give more information? like which versions you are using and a
simple example of a notebook that generates the wrong output so I can test
it.


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-37134720
.


WANG Aiyong

from pelican-jupyter.

danielfrg avatar danielfrg commented on September 23, 2024

Hi, I am sorry that I haven't been able to take a look at this but right know I am busy with school and real life job. That doesn't mean I will not take a look when I have some free time.

If you can find the solution and pull requested it would be amazing :)

Reopening in any case

from pelican-jupyter.

gepcel avatar gepcel commented on September 23, 2024

Hi. I'm new to python, and I'm new to github. Actually I'm new to the whole
open source community. In the past few years all I've used to accomplish my
work is something like Excel, SPSS, Primer, ArcGis...

I've been trying python for data manipulating, analysing, visualizing
recently. But fixing this problem may be beyond of my capability for now. I
closed the issue because it's not appropriate to open an issue for not the
plugin's problem.

Anyway I'll let you know if I figure something out. But before that I might
need searching some information about debugging, testing, and some other
advanced knowledge about python.

And may I ask, is it ok if ask for your advice occasionally about python
and some other open source stuff in the future? Any advice will be helpful
for me.

Daniel Rodriguez [email protected]于2014年3月18日星期二写道:

Hi, I am sorry that I haven't been able to take a look at this but right
know I am busy with school and real life job. That doesn't mean I will not
take a look when I have some free time.

If you can find the solution and pull requested it would be amazing :)

Reopening in any case


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-37852309
.


WANG Aiyong

from pelican-jupyter.

danielfrg avatar danielfrg commented on September 23, 2024

First of all, welcome to the community, I am sure you will enjoy python more than Excel and SPSS :)

Yes, you can ask me any questions and i will do my best to help you.

I reopened this since I am not sure is not the plugins error, if I found out is something else I will close it again.

from pelican-jupyter.

gepcel avatar gepcel commented on September 23, 2024

Hi.

Could you please give me some advice about how to test a pelican plugin,
ipythonnb for example (^_^)?

Modify the ipythonnb.py, switch to the pelican-blog folder, and run
make html in terminal seems to be a wrong way.It shows very little error
message, and hard to locate the error position.

I made a test_pelican.py file under the pelican-blog file:

from pelican import Pelican
from pelican.settings import read_settings
settings=read_settings('pelicanconf.py', override={
               'PATH': 'content',  'OUTPUT_PATH': 'Temp_Out',})
pelican=Pelican(settings=settings)
pelican.run()

Seems like this didn't include the ipythonnb plugin, an error message
WARNING:pelican.generators:Could not process .\\2014-03-21-Economic-Obervations-On the-Internet.ipynb must be type, not classobj

Any help ? A little hint, or some test examples, or some urls, or even some
keywords that I could google would be helpful.

Thank you.

from pelican-jupyter.

gepcel avatar gepcel commented on September 23, 2024

Hi, sorry to bother again.

Though I didn't figure a better way to test or debug, I used my
test_pelican.py
way, traced to something, modified something and finally made this plugin
work for python 2.7 under my system.
Here is my fork: https://github.com/wangaiyong/pelican-ipythonnb

My env is as following:
Win 7 x64 (Chinese language)
Python 2.7.6
pelican 3.3.0

I could use some advice on how to do this debug thing right(^_^), if it's
ok with you.

Aiyong WANG [email protected]于2014年3月21日星期五写道:

Hi.

Could you please give me some advice about how to test a pelican plugin,
ipythonnb for example (^_^)?

Modify the ipythonnb.py, switch to the pelican-blog folder, and run
make html in terminal seems to be a wrong way.It shows very little error
message, and hard to locate the error position.

I made a test_pelican.py file under the pelican-blog file:

from pelican import Pelican

from pelican.settings import read_settings


settings=read_settings('pelicanconf.py', override={

'PATH': 'content',

'OUTPUT_PATH': 'Temp_Out',})

pelican=Pelican(settings=settings)

pelican.run()

Seems like this didn't include the ipythonnb plugin, an error message
`WARNING:pelican.generators:Could not process
.\2014-03-21-Economic-Obervations-On the-Internet.ipynb

must be type, not classobj`

Any help ? A little hint, or some test examples, or some urls, or even
some keywords that I could google would be helpful.

Thank you.

Daniel Rodriguez <[email protected]javascript:_e(%7B%7D,'cvml','[email protected]');

于2014年3月18日星期二写道:

First of all, welcome to the community, I am sure you will enjoy python
more than Excel and SPSS :)

Yes, you can ask me any questions and i will do my best to help you.

I reopened this since I am not sure is not the plugins error, if I found
out is something else I will close it again.


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-37938854
.


WANG Aiyong


WANG Aiyong

from pelican-jupyter.

danielfrg avatar danielfrg commented on September 23, 2024

Ok, on this particular case is a little bit tricky but here is some help.

What I did was develop interactively using the regular ipython notebook, so I tested all the functionality (html export and so on) and created some functions. Then, when it was working I moved it to a single .py file.

To test the changes now I modify ipythonnb.py and run make html. It is not the most amazing workflow but for a simple project it works fine.

If you want to really debug it I recommend using pycharm, download the free version and read their documentation on how to debug it. You will be able to go line by line of you code, see all the variables values and so on.

from pelican-jupyter.

danielfrg avatar danielfrg commented on September 23, 2024

Do you know if this is still an issue with the newer versions of IPython?

from pelican-jupyter.

DanceOfDragon avatar DanceOfDragon commented on September 23, 2024

Hi, Daniel

First thanks for creating the great plugin!
May I know if this issue has been resolved? I followed your recommended method and I also encountered the same problem recently, as shown below:
screenshot 2015-09-23 18 19 56

My setup:

Mac OS X
Pelican 3.6.0
iPython notebook 3.2.1
Python 2,7.10

from pelican-jupyter.

danielfrg avatar danielfrg commented on September 23, 2024

Hello, I just tested that example you posted on my setup and it looks to be working in the latest versions. See here (at the end): http://danielfrg.com/drafts/ipython-notebook-templates.html

My setup:

(blog)➜  blog git:(master) conda list
# packages in environment at /Users/drodriguez/anaconda/envs/blog:
#
blinker                   1.4                       <pip>
certifi                   14.05.14                 py34_0
decorator                 4.0.2                    py34_0
docutils                  0.12                      <pip>
feedgenerator             1.7                       <pip>
ipykernel                 4.0.3                    py34_0
ipython                   4.0.0                    py34_0
ipython-genutils          0.1.0                     <pip>
ipython-notebook          4.0.4                    py34_0
ipython_genutils          0.1.0                    py34_0
jinja2                    2.8                      py34_0
jsonschema                2.4.0                    py34_0
jupyter-client            4.0.0                     <pip>
jupyter-core              4.0.4                     <pip>
jupyter_client            4.0.0                    py34_0
jupyter_core              4.0.4                    py34_0
libsodium                 0.4.5                         0
markdown                  2.6.2                     <pip>
markupsafe                0.23                     py34_0
mistune                   0.7                      py34_0
nbconvert                 4.0.0                    py34_0
nbformat                  4.0.0                    py34_0
notebook                  4.0.4                    py34_0
openssl                   1.0.1k                        1
path.py                   7.6                      py34_0
pelican                   3.6.3                     <pip>
pexpect                   3.3                      py34_0
pickleshare               0.5                      py34_0
pip                       7.1.2                    py34_0
ptyprocess                0.4                      py34_0
pygments                  2.0.2                    py34_0
python                    3.4.3                         0
python-dateutil           2.4.2                     <pip>
python.app                1.2                      py34_4
pytz                      2015.4                    <pip>
pyzmq                     14.7.0                   py34_0
readline                  6.2                           2
setuptools                18.1                     py34_0
simplegeneric             0.8.1                    py34_0
six                       1.9.0                     <pip>
sqlite                    3.8.4.1                       1
terminado                 0.5                      py34_0
tk                        8.5.18                        0
tornado                   4.2.1                    py34_0
traitlets                 4.0.0                    py34_0
unidecode                 0.4.18                    <pip>
wheel                     0.24.0                   py34_0
xz                        5.0.5                         0
zeromq                    4.0.5                         0
zlib                      1.2.8                         0

from pelican-jupyter.

DanceOfDragon avatar DanceOfDragon commented on September 23, 2024

Hi, thank you very much!
I turns out to be working fine after I replaced the original plugin with your newest one.

Another minor issue when generating the HTML file, not sure if you happen to know about it.
screenshot 2015-09-24 15 08 14

from pelican-jupyter.

FlorianWilhelm avatar FlorianWilhelm commented on September 23, 2024

@DanceOfDragon @danielfrg Hi, I think this error is not really solved. It only works if BeautifulSoup4 is not installed. If it is intsalled in core.get_html_from_filepath BeautifulSoup starts to mask all ampersands.

from pelican-jupyter.

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.