takluyver / cite2c

Citations in the Jupyter Notebook
MIT License
318 stars 35 forks source link

I can't execute the cite2c/main. #32

Closed huangteng1220 closed 6 years ago

huangteng1220 commented 7 years ago

I had install cite2c/main. But in my configurable nbextensions, the cite2/main is gray as following figure , it can't be used. Why? Would you help me? Thank you very much.

![Uploading A9174681-3AED-4CE2-BF34-842248A1E58F.png…]()

takluyver commented 7 years ago

Sorry for the very delayed reply. It looks like the screenshot didn't upload properly. I don't know what the problem was, so I hope you worked it out somehow.

mticlla commented 6 years ago

Here a screenshot of mine image

If I uncheck the 'disable configuration ....' button , then image

But it says that yaml file is not provided to configure it

mticlla commented 6 years ago

Python 3.5.2 Jupyter 4.4.0

After executing jupyter nbextension enable cite2c/main image

But when Zotero authentication is required, the new tab just says image

takluyver commented 6 years ago

Can you run python -m cite2c.install to enable it? It's got a server part and a frontend part, and I think you've enabled the frontend part without the server part.

mticlla commented 6 years ago

Thanks Thomas, after running that line, got these messages image

I then disable and re-enable cite2c/main, but I still have the same problem

takluyver commented 6 years ago

Can you look for a file ~/.jupyter/jupyter_notebook_config.json and see what it's got in it?

mticlla commented 6 years ago

image

takluyver commented 6 years ago

That looks right. Have you stopped the notebook server and launched it (jupyter notebook) again after enabling the extension?

mticlla commented 6 years ago

Yes, I even deactivates the virtual environment and then reactivated it, and then launched again jupyter notebook

takluyver commented 6 years ago

Is there anything that looks relevant in the logging to the terminal where you launched the notebook?

mticlla commented 6 years ago

Maybe that the server runs at an https://[all ip addresses on your system]:xxxx/tree

The authentication tab will look like: https://[all ip addresses on your system]:xxxx/cite2c/zotero_oauth

could it be the https?

The browser labels the connection as non-secure (because of a self-signed certificate)

Also, when starting the server: image

takluyver commented 6 years ago

Oh, I see the problem. In this function, it skips setting up the handlers if it can't find the Zotero styles directory. It should add the OAuth handlers even if the styles directory is missing, because the styles are completely separate.

I'm just about to go to bed, but hopefully that gives you enough info to get it working for now. Feel free to send a PR if you're comfortable doing so.

mticlla commented 6 years ago

Thanks a lot Thomas, I'm also almost going to bed. Will fix it tomorrow.

mticlla commented 6 years ago

I just commented the return line in that function and now cite2c works in my notebooks :) Thanks

takluyver commented 6 years ago

Great. And I've just released 0.2.1 with that issue fixed. :-)