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

"TypeError: expected str, bytes or os.PathLike object, not WindowsPath" in Windows 10 #18508

Closed
daniel-yj-yang opened this issue Sep 17, 2020 · 1 comment

Comments

@daniel-yj-yang
Copy link

Bug report

Bug summary

"TypeError: expected str, bytes or os.PathLike object, not WindowsPath" in Windows 10

Code for reproduction

import matplotlib

Actual outcome

...
File "...\matplotlib\__init__.py", line 777, in _open_file_or_url
  fname = os.path.expanduser(fname)
File "...\lib\ntpath.py", line 312, in expanduser
  path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not WindowsPath

Expected outcome

Matplotlib version

  • Operating system: Windows 10
  • Matplotlib version: 3.3.2
  • Matplotlib backend (print(matplotlib.get_backend())):
  • Python version: 3.6.4
  • Jupyter version (if applicable):
  • Other libraries:
@daniel-yj-yang
Copy link
Author

Sorry, it appears that the root cause sits in something else in the system. The issue is not reproducible, after rebuilding the user's python libraries.

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

No branches or pull requests

1 participant