question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError when opening a project

See original GitHub issue

Description

What steps will reproduce the problem?

While in a project opened at Spyder start-up I try to click Projects->Open Project and I receive this error

Traceback

  File "C:\anaconda3\envs\tf20\lib\site-packages\spyder\plugins\projects\plugin.py", line 98, in <lambda>
    triggered=lambda v: self.open_project())
  File "C:\anaconda3\envs\tf20\lib\site-packages\spyder\plugins\projects\plugin.py", line 288, in open_project
    self.notify_project_open(path)
  File "C:\anaconda3\envs\tf20\lib\site-packages\spyder\plugins\completion\decorators.py", line 22, in wrapper
    self.emit_request(method, params, requires_response)
  File "C:\anaconda3\envs\tf20\lib\site-packages\spyder\plugins\projects\plugin.py", line 553, in emit_request
    self.main.completions.broadcast_notification(method, params)
  File "C:\anaconda3\envs\tf20\lib\site-packages\spyder\plugins\completion\plugin.py", line 323, in broadcast_notification
    req_type, req)
  File "C:\anaconda3\envs\tf20\lib\site-packages\spyder\plugins\completion\languageserver\plugin.py", line 578, in broadcast_notification
    self.send_notification(language, request, params)
  File "C:\anaconda3\envs\tf20\lib\site-packages\spyder\plugins\completion\languageserver\plugin.py", line 569, in send_notification
    client.perform_request(request, params)
  File "C:\anaconda3\envs\tf20\lib\site-packages\spyder\plugins\completion\languageserver\client.py", line 527, in perform_request
    _id = handler(params)
  File "C:\anaconda3\envs\tf20\lib\site-packages\spyder\plugins\completion\languageserver\decorators.py", line 41, in wrapper
    params = req(self, *args, **kwargs)
  File "C:\anaconda3\envs\tf20\lib\site-packages\spyder\plugins\completion\languageserver\providers\workspace.py", line 46, in send_workspace_folders_change
    folder_uri = path_as_uri(folder)
  File "C:\anaconda3\envs\tf20\lib\site-packages\spyder\plugins\completion\languageserver\providers\utils.py", line 51, in path_as_uri
    path_obj = pathlib.Path(osp.abspath(path))
  File "C:\anaconda3\envs\tf20\lib\ntpath.py", line 526, in abspath
    return normpath(_getfullpathname(path))
TypeError: _getfullpathname: path should be string, bytes or os.PathLike, not NoneType

Versions

  • Spyder version: 4.1.4
  • Python version: 3.7.7
  • Qt version: 5.9.6
  • PyQt5 version: 5.9.2
  • Operating System: Windows 10

Dependencies


# Mandatory:
atomicwrites >=1.2.0           :  1.4.0 (OK)
chardet >=2.0.0                :  3.0.4 (OK)
cloudpickle >=0.5.0            :  1.5.0 (OK)
diff_match_patch >=20181111    :  20200713 (OK)
intervaltree                   :  None (OK)
IPython >=4.0                  :  7.16.1 (OK)
jedi =0.17.1                   :  0.17.1 (OK)
nbconvert >=4.0                :  5.6.1 (OK)
numpydoc >=0.6.0               :  1.1.0 (OK)
paramiko >=2.4.0               :  2.7.1 (OK)
parso =0.7.0                   :  0.7.0 (OK)
pexpect >=4.4.0                :  4.8.0 (OK)
pickleshare >=0.4              :  0.7.5 (OK)
psutil >=5.3                   :  5.7.0 (OK)
pygments >=2.0                 :  2.6.1 (OK)
pylint >=1.0                   :  2.5.3 (OK)
pyls >=0.34.0;<1.0.0           :  0.34.1 (OK)
qdarkstyle >=2.8               :  2.8.1 (OK)
qtawesome >=0.5.7              :  0.7.2 (OK)
qtconsole >=4.6.0              :  4.7.5 (OK)
qtpy >=1.5.0                   :  1.9.0 (OK)
rtree >=0.8.3                  :  0.9.4 (OK)
sphinx >=0.6.6                 :  3.1.2 (OK)
spyder_kernels >=1.9.2;<1.10.0 :  1.9.2 (OK)
watchdog                       :  None (OK)
zmq >=17                       :  19.0.1 (OK)

# Optional:
cython >=0.21                  :  0.29.21 (OK)
matplotlib >=2.0.0             :  3.2.2 (OK)
numpy >=1.7                    :  1.18.5 (OK)
pandas >=0.13.1                :  1.0.5 (OK)
scipy >=0.17.0                 :  1.5.0 (OK)
sympy >=0.7.3                  :  1.6.1 (OK)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ccordoba12commented, Jul 21, 2020

Thanks @dalthviz for the feedback. I have two comments about this:

  1. Issue #12967 shows that the problem was present before 4.1.4.
  2. Although we can’t reproduce this on our side, the solution is simply validating that the project’s path is not None when trying to open a project.
0reactions
dalthvizcommented, Jul 23, 2020

Just in case, I was able to reproduce this:

p

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting a typeError error in django project - Stack Overflow
I created a virtual environment for my new project, installed django and started the new project. However, whenever i run a line of...
Read more >
TypeError when opening a merge request as admin without ...
Ran into a bug: TypeError when opening a merge request as admin without being a project member. The merge request widget keeps being...
Read more >
Cannot read property 'python' of null - RStudio Community
when I try to create new project, I receive an error (TypeError): Cannot read property 'python' of null. OS: Windows 11
Read more >
TypeError: "x" is not a constructor - JavaScript - MDN Web Docs
The JavaScript exception "is not a constructor" occurs when there was an attempt to use an object or a variable as a constructor,...
Read more >
After a Jira upgrade, getting the error "Exception: Uncaught ...
... Uncaught TypeError: Cannot read property" when opening any Jira board ... When trying to open a board, various variations of the error ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found