Skip to content

Update cache.py(fix 'WindowsPath' object has no attribute 'expanduser') #196

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

Closed
wants to merge 1 commit into from

Conversation

kv1830
Copy link

@kv1830 kv1830 commented Aug 22, 2021

fix 'WindowsPath' object has no attribute 'expanduser'

when I start ipython in windows11, will cause the errors below:
(base) C:\Users\kv183>ipython
Traceback (most recent call last):
File "D:\Program\Miniconda3\Scripts\ipython-script.py", line 6, in
from IPython import start_ipython
File "D:\Program\Miniconda3\lib\site-packages\IPython_init_.py", line 56, in
from .terminal.embed import embed
......
File "D:\Program\Miniconda3\lib\site-packages\parso\cache.py", line 76, in
_default_cache_path = _get_default_cache_path()
File "D:\Program\Miniconda3\lib\site-packages\parso\cache.py", line 73, in get_default_cache_path
return dir
.expanduser()
AttributeError: 'WindowsPath' object has no attribute 'expanduser'

because the Path class in windows doesn't has the funciton named 'expanduser'

fix 'WindowsPath' object has no attribute 'expanduser'
@kv1830 kv1830 closed this Aug 22, 2021
@kv1830
Copy link
Author

kv1830 commented Aug 22, 2021

my Lib\site-packages has a pathlib.py, and it's wrong..., I don't know where it came from.
the right pathlib.py is Lib\pathlib.py, and the pathlib.Path has function named expanduser

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.

1 participant