Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Add '+' button to open new notebooks. #16

Merged
merged 2 commits into from
Jan 9, 2017

Conversation

dalthviz
Copy link
Member

@dalthviz dalthviz commented Jan 9, 2017

Fixes #11

@ccordoba12 ccordoba12 added this to the v0.1 milestone Jan 9, 2017
@ccordoba12
Copy link
Member

This is so nice! Thanks a lot for it.

Is the notebook working well for you on Windows?

@@ -57,7 +57,13 @@ def __init__(self, parent):
self.initialize_plugin()

layout = QVBoxLayout()
self.tabwidget = Tabs(self, self.menu_actions)
new_notebook_btn = create_toolbutton(self,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a blank line before this one.

@dalthviz
Copy link
Member Author

dalthviz commented Jan 9, 2017

@ccordoba12 about how the notebook is working:

  1. Sometimes Spyder fails to initialice the notebook server at time, so the plugin stays in the load page (Connecting to kernel), so you have to open a new notebook to make it work (I think that maybe this is a problem of synchronization where the notebook server isn't running when the first notebook is trying to run in Spyder).

  2. Also if you close Spyder and the cmd where the notebook server is running (the one open by Spyder for the first time), you will have to manually start the notebook server with jupyter notebook command because Spyder doesn't start it again when you reopen Spyder.

  3. Also, another problem is the update of the font. When I was trying to change the language a traceback appear:

Traceback (most recent call last):
  File "C:\Users\Daniel\Anaconda3\lib\site-packages\spyder\plugins\configdialog.py", line 218, in button_clicked
    configpage.apply_changes()
  File "C:\Users\Daniel\Anaconda3\lib\site-packages\spyder\plugins\configdialog.py", line 97, in apply_changes
    self.save_to_conf()
  File "C:\Users\Daniel\Anaconda3\lib\site-packages\spyder\plugins\configdialog.py", line 410, in save_to_conf
    self.set_font(font, option)
  File "C:\Users\Daniel\Anaconda3\lib\site-packages\spyder\plugins\configdialog.py", line 985, in set_font
    plugin.update_font()
  File "C:\Users\Daniel\.spyder-py3\plugins\spyder_notebook\notebookplugin.py", line 92, in update_font
    client.set_font(font)
AttributeError: 'NotebookClient' object has no attribute 'set_font'
  1. Another traceback appear also when trying to undock the plugin in Spyder 4.0.0.dev0:
Traceback (most recent call last):
  File "C:\Users\Daniel\.spyder-py3\plugins\spyder_notebook\notebookplugin.py", line 131, in refresh_plugin
    self.update_plugin_title.emit()
AttributeError: 'function' object has no attribute 'emit'
Using existing server at C:\Users\Daniel
Traceback (most recent call last):
  File "C:\Users\Daniel\Desktop\Spyder\spyder\spyder\api\plugins.py", line 141, in visibility_changed
    self.refresh_plugin()   # To give focus to the plugin's widget
  File "C:\Users\Daniel\.spyder-py3\plugins\spyder_notebook\notebookplugin.py", line 131, in refresh_plugin
    self.update_plugin_title.emit()
AttributeError: 'function' object has no attribute 'emit'
Traceback (most recent call last):
  File "C:\Users\Daniel\Desktop\Spyder\spyder\spyder\api\plugins.py", line 141, in visibility_changed
    self.refresh_plugin()   # To give focus to the plugin's widget
  File "C:\Users\Daniel\.spyder-py3\plugins\spyder_notebook\notebookplugin.py", line 131, in refresh_plugin
    self.update_plugin_title.emit()
AttributeError: 'function' object has no attribute 'emit'
  1. Also a message appears in the notebook pointing an error, however maybe this is normal since the notebook is at first temporal:

error_notebook

@ccordoba12
Copy link
Member

ccordoba12 commented Jan 9, 2017

About your comments:

  1. Please play with the range value below this line:

    /~https://github.com/spyder-ide/spyder-notebook/blob/master/spyder_notebook/utils/nbopen.py#L57

    and submit a PR when you find an appropriate value.

  2. We'll fix this in the future, i.e. we'll hide the server cmd window by default. For now, I think it's worth to have it around to check for errors.

  3. Fixed in PR PR: Don't try to set the widget fonts for now #17.

  4. Fixed in master PR PR: Simplify plugin title #14.

  5. I have no idea about that error. We'll have to check it when we meet in person.

@ccordoba12
Copy link
Member

@dalthviz, please open an issue about your point 5. so we don't forget to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants