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: Set wldset and wxdset to None when project change to avoid a crash #284

Merged
merged 1 commit into from
Apr 11, 2019

Conversation

jnsebgosselin
Copy link
Owner

This PR fixes the following error that happens when switching project. This was introduced in PR #277.

Traceback (most recent call last):
  File "C:\Users\User\gwhat\gwhat\projet\manager_data.py", line 190, in set_projet
    self.wldset_changed()
  File "C:\Users\User\gwhat\gwhat\projet\manager_data.py", line 287, in wldset_changed
    self.update_wldset_info()
  File "C:\Users\User\gwhat\gwhat\projet\manager_data.py", line 271, in update_wldset_info
    wldset = self.get_current_wldset()
  File "C:\Users\User\gwhat\gwhat\projet\manager_data.py", line 296, in get_current_wldset
    if self._wldset is None or self._wldset.name != cbox_text:
  File "C:\Users\User\gwhat\gwhat\projet\reader_projet.py", line 451, in name
    return osp.basename(self.dset.name)
  File "C:\Anaconda3\envs\pyhelp-dev\lib\ntpath.py", line 236, in basename
    return split(p)[1]
  File "C:\Anaconda3\envs\pyhelp-dev\lib\ntpath.py", line 205, in split
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

@jnsebgosselin jnsebgosselin added this to the gwhat-0.4.0 milestone Apr 11, 2019
@jnsebgosselin jnsebgosselin self-assigned this Apr 11, 2019
@jnsebgosselin jnsebgosselin changed the title Set wldset and wxdset to None when proj change Set wldset and wxdset to None when project change to avoid a crash Apr 11, 2019
@jnsebgosselin jnsebgosselin changed the title Set wldset and wxdset to None when project change to avoid a crash PR: Set wldset and wxdset to None when project change to avoid a crash Apr 11, 2019
@jnsebgosselin jnsebgosselin merged commit c223383 into master Apr 11, 2019
@jnsebgosselin jnsebgosselin deleted the prevent_crash_switch_project branch April 12, 2019 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant