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

AttributeError: 'NoneType' object has no attribute 'get_active_project_path' #7403

Closed
kubilayovacikli opened this issue Jul 7, 2018 · 18 comments

Comments

@kubilayovacikli
Copy link

Description

What steps will reproduce the problem?

(python3:12490): Gtk-WARNING **: 13:04:31.888: Theme parsing error: gtk-main.css:73:38: Failed to import: Error opening file /usr/share/themes/Radiance/gtk-3.20/apps/gnome-builder.css: No such file or directory

Traceback

  File "/usr/local/lib/python3.6/dist-packages/spyder/app/mainwindow.py", line 1961, in valid_project
    if bool(self.projects.get_active_project_path()):
AttributeError: 'NoneType' object has no attribute 'get_active_project_path'
WARNING:spyder.widgets.github.backend:failed to send bug report on github. response={'code': 401, 'json': {'message': 'Bad credentials', 'documentation_url': 'https://developer.github.com/v3'}}

Versions

  • Spyder version: 3.3.0
  • Python version: 3.6.5
  • Qt version: 5.9.3
  • PyQt5 version: 5.9.2
  • Operating System: Linux 4.15.0-24-generic

Dependencies

pyflakes >=0.6.0  :  2.0.0 (OK)
pycodestyle >=2.3 :  2.4.0 (OK)
pygments >=2.0    :  2.2.0 (OK)
sphinx >=0.6.6    :  1.7.5 (OK)
rope >=0.9.4      :  0.10.7 (OK)
jedi >=0.9.0      :  0.12.1 (OK)
psutil >=0.3      :  5.4.6 (OK)
nbconvert >=4.0   :  5.3.1 (OK)
pandas >=0.13.1   :  None (NOK)
numpy >=1.7       :  1.14.3 (OK)
sympy >=0.7.3     :  None (NOK)
cython >=0.21     :  None (NOK)
qtconsole >=4.2.0 :  4.3.1 (OK)
IPython >=4.0     :  5.5.0 (OK)
matplotlib >=2.0.0:  2.2.2 (OK)
pylint >=0.25     :  1.9.2 (OK)
@ccordoba12 ccordoba12 changed the title Gtk-Warning error AttributeError: 'NoneType' object has no attribute 'get_active_project_path' Jul 7, 2018
@ccordoba12
Copy link
Member

Please describe step by step how you got this error so we can reproduce it in our side. If you fail to do that, we'll close this issue in a week from now.

Also, please read our

https://github.com/spyder-ide/spyder/wiki/Troubleshooting-Guide-and-FAQ

to see if you are able to fix this problem by following it.

@mayurpande
Copy link

So I am still not able to use the ipython console during this time?

@ccordoba12
Copy link
Member

This error is not related at all to the IPython console.

@mayurpande
Copy link

@ccordoba12 Ok you closed my issue and related it to this, but my error the ipython console not opening because of the kernel error this happened after the update to 3.3.0

It says that Your Python environment or installation doesn't have the spyder‑kernels module installed on it. Without this module is not possible for Spyder to create a console for you.

But this is not the case I do have spyder-kernels installed.

spyder

This was the error of mine you closed;

#7412

It was sent via your automatic error checking tool.

@ccordoba12
Copy link
Member

You probably installed spyder-kernels in another Python virtualenv. You need to figure that out by yourself.

@mayurpande
Copy link

ok you are correct that when I come out of my virtualenv the ipython console is there. But in my virutalenv spyder-kernels is already installed each time I do pip install spyder-kernels it says requirement already satisfied, this has never happened before on a update.

@mayurpande
Copy link

Here it can be seen that spyder-kernels is installed in my virtualenv

spyderkernels

@mayurpande
Copy link

@ccordoba12 Ok I have tried everything, I tried to delete my virtualenv and reset the path, did not work, I have tried to reinstall spyder and delete virtualenv and reset the path, and it still doesn't work. As mentioned before this happened when I updated, it has never happened before.

@ccordoba12
Copy link
Member

Is Spyder installed in your virtualenv? Reading again #7412, I'd say you installed it globally, so spyder-kernels needs to be installed globally too. Or you need to change your Python interpreter to point to one in your virtualenv. You can do that by going to

Preferences > Python Interpreter

Ok I have tried everything

Look, this is why we don't have time to give support for installations other than Anaconda. This is a very simple thing if you'd understand well how virtualenvs work and how to make Spyder work with them.

@mayurpande
Copy link

I have literally done all of this earlier, I am really confused as to how it is not working.

@mayurpande
Copy link

spyder is installed globally, and spyder-kernels is installed globally and in my virtual env as well. It works without my virtual env but when I change the interpreter to my virtual env it gives me the same error.

@ccordoba12
Copy link
Member

I think I know what's happening. You need to run in your virtualenv

pip install spyder-kernels==0.*

@mayurpande
Copy link

Thank you! This worked, can I ask why was this the case?

@ccordoba12
Copy link
Member

Because Spyder 3.3 requires spyder-kernels versions less than 1.0

I'll improve the error message to make that clear.

@ccordoba12
Copy link
Member

@dalthviz, are you able to reproduce this problem in a clean conda env on Windows?

This was referenced Jul 15, 2018
@CAM-Gerlach
Copy link
Member

@ccordoba12 For what it's worth, I did some testing and did not observe this problem installing and running Spyder from conda-forge into 3 different new, clean environments on two different machines (Win 8.1 and Win 10), both with "mixed" and (almost) all conda-forge packages, with both qt/pyqt 5.6 and 5.9 and with Python 3.6.6. Every report I've seen has been on Linux.

@ccordoba12
Copy link
Member

Yes, it's on Linux, but I wanted to be sure if it's seen in other OSes.

@CAM-Gerlach
Copy link
Member

@ccordoba12 Right. If there's any further specific testing I can do, let me know.

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

No branches or pull requests

4 participants