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

Space in Windows Username Fixes #22027

Closed
wants to merge 1 commit into from

Conversation

hyperionrock
Copy link

Description of Changes

  • Wrote at least one-line docstrings (for any new functions)
  • Added unit test(s) covering the changes (if testable)
  • Included a screenshot or animation (if affecting the UI, see Licecap)

Mitigates issues related to spaces in windows username path. Added other additional checks that can be extrapolated to other problems areas (see screenshot below) as I'm not too familiar with the codebase.

Issue(s) Resolved

Issue: Kernel not running due to space in windows username, causing only partial path string.

Relevant issues:
#21937, #4150 and closed issues #21662, #21909

spaceusername

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct: hyperionrock

@pep8speaks
Copy link

pep8speaks commented Apr 26, 2024

Hello @hyperionrock! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 186:80: E501 line too long (102 > 79 characters)
Line 188:80: E501 line too long (132 > 79 characters)
Line 191:80: E501 line too long (85 > 79 characters)
Line 199:80: E501 line too long (98 > 79 characters)
Line 206:80: E501 line too long (136 > 79 characters)

Comment last updated at 2024-04-29 04:37:55 UTC

@dalthviz
Copy link
Member

Hi @hyperionrock thank you for your interest in helping and contributing to Spyder! Sadly, I don't think the changes here will help with the mentioned issues :/

If you are experiencing an issue due to the spaces over paths from the IPython Console, could it be possible for you to test the generated Windows installers at https://github.com/spyder-ide/spyder/actions/runs/8853573213?pr=22028, which are part of PR #22028 ?

Also, if you are interested in contributing to Spyder in general, you can check the Contributing guide (https://github.com/spyder-ide/spyder/blob/master/CONTRIBUTING.md) to get more details of the handling we do for PRs (master branch vs 5.x branch for example) and more!

Let us know!

@hyperionrock
Copy link
Author

hyperionrock commented Apr 29, 2024

Hi @dalthviz
I have downloaded and installed the Spyder 5.6.0dev0 build and can confirm it does not have the previous error inside the ipython console.

However investigating further I had a suspicion and downloaded the standalone windows installer of the current released version (5.5.4) and oddly enough there is also no error there too.
Previously I had installed Spyder inside my miniconda environment using pip install spyder
This had the space in username issues and so to double checked i installed spyder into a new environment using
conda create -c conda-forge -n spyder-env spyder
and ran the command spyder (edit: within the spyder-env using conda activate) which resulted in the ipython console errors

I saw a comment saying to try running jupyter qtconsole to see if this is systemic issue and can confirm that console works fine.

This leads me to suspect the issue is specifically with installing Spyder into Anaconda and other similar environments. Not entirely sure why that is, but this should help in isolating the issue.

@hyperionrock
Copy link
Author

@dalthviz If you discover a solution let me know and I will try to install and test it within a new environment

@dalthviz
Copy link
Member

Thank you for giving the installers a check @hyperionrock !

Regarding your test with pip/conda versions of Spyder, I think another test that you could do is either use the PR #22028 branch (https://github.com/dalthviz/spyder/tree/fixes_issue_21937) and install Spyder from that source in a new conda env or patch manually your pip/conda Spyder installations (Spyder files inside your spyder-env env for example) with the change PR #22028 proposes (https://github.com/spyder-ide/spyder/pull/22028/files).

Let us know!

@hyperionrock
Copy link
Author

Hello @dalthviz.
I can confirm that manually patching the conda-activate script worked.
Is this fix is in the 5.5.4 version? Not sure why it didn't install for me, but thank you for your help

@dalthviz
Copy link
Member

Thank you for the testing @hyperionrock ! The fix will be part of the next release (5.5.5). To follow up the release, you can check the v5.5.5 milestone: https://github.com/spyder-ide/spyder/milestone/143

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.

None yet

3 participants