René's URL Explorer Experiment


Title: import error when non-ascii characters are present in cwd or user name (windows) · Issue #3516 · matplotlib/matplotlib · GitHub

Open Graph Title: import error when non-ascii characters are present in cwd or user name (windows) · Issue #3516 · matplotlib/matplotlib

X Title: import error when non-ascii characters are present in cwd or user name (windows) · Issue #3516 · matplotlib/matplotlib

Description: Ahoy! I have recently updated matplotlib through conda to version 14.0 (np19py27_0). I am using windows 8, python 2.7.7 (Anaconda distribution 2.0.2 32-bit) Unfortunatelly my windows user name contains non-ascii caracter (ś) and importin...

Open Graph Description: Ahoy! I have recently updated matplotlib through conda to version 14.0 (np19py27_0). I am using windows 8, python 2.7.7 (Anaconda distribution 2.0.2 32-bit) Unfortunatelly my windows user name cont...

X Description: Ahoy! I have recently updated matplotlib through conda to version 14.0 (np19py27_0). I am using windows 8, python 2.7.7 (Anaconda distribution 2.0.2 32-bit) Unfortunatelly my windows user name cont...

Opengraph URL: https://github.com/matplotlib/matplotlib/issues/3516

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"import error when non-ascii characters are present in cwd or user name (windows)","articleBody":"Ahoy!\nI have recently updated matplotlib through conda to version `14.0` (`np19py27_0`).\nI am using windows 8, python 2.7.7 (Anaconda distribution 2.0.2 32-bit)\nUnfortunatelly my windows user name contains non-ascii caracter (`ś`) and importing matplotlib gives errors. :cry: (previous matplotlib versions I used did not have any problem with this)\n\nThe error comes in two flavors:\n:black_circle: If my current working directory contains non-ascii character then:\n\n``` python\n---------------------------------------------------------------------------\nUnicodeDecodeError                        Traceback (most recent call last)\n\u003cipython-input-1-82be63b7783c\u003e in \u003cmodule\u003e()\n----\u003e 1 import matplotlib\n\nD:\\Python\\Anaconda\\lib\\site-packages\\matplotlib\\__init__.py in \u003cmodule\u003e()\n   1046 \n   1047 # this is the instance used by the matplotlib classes\n-\u003e 1048 rcParams = rc_params()\n   1049 \n   1050 if rcParams['examples.directory']:\n\nD:\\Python\\Anaconda\\lib\\site-packages\\matplotlib\\__init__.py in rc_params(fail_on_error)\n    895     default matplotlib rc file.\n    896     \"\"\"\n--\u003e 897     fname = matplotlib_fname()\n    898     if not os.path.exists(fname):\n    899         # this should never happen, default in mpl-data should always be found\n\nD:\\Python\\Anaconda\\lib\\site-packages\\matplotlib\\__init__.py in matplotlib_fname()\n    746       system-defined copy.\n    747     \"\"\"\n--\u003e 748     fname = os.path.join(os.getcwd(), 'matplotlibrc')\n    749     if os.path.exists(fname):\n    750         return fname\n\nD:\\Python\\Anaconda\\lib\\ntpath.pyc in join(path, *paths)\n     82         if result_path and result_path[-1] not in '\\\\/':\n     83             result_path = result_path + '\\\\'\n---\u003e 84         result_path = result_path + p_path\n     85     return result_drive + result_path\n     86 \n\nUnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 11: ordinal not in range(128)\n```\n\n:black_circle: If I change my current directory so that it does not contain any ascii characters the error transforms itself a little:\n\n``` python\n---------------------------------------------------------------------------\nUnicodeDecodeError                        Traceback (most recent call last)\n\u003cipython-input-6-1d1446f6fa64\u003e in \u003cmodule\u003e()\n----\u003e 1 from matplotlib import pyplot as plt\n\nD:\\Python\\Anaconda\\lib\\site-packages\\matplotlib\\__init__.py in \u003cmodule\u003e()\n   1046 \n   1047 # this is the instance used by the matplotlib classes\n-\u003e 1048 rcParams = rc_params()\n   1049 \n   1050 if rcParams['examples.directory']:\n\nD:\\Python\\Anaconda\\lib\\site-packages\\matplotlib\\__init__.py in rc_params(fail_on_error)\n    895     default matplotlib rc file.\n    896     \"\"\"\n--\u003e 897     fname = matplotlib_fname()\n    898     if not os.path.exists(fname):\n    899         # this should never happen, default in mpl-data should always be found\n\nD:\\Python\\Anaconda\\lib\\site-packages\\matplotlib\\__init__.py in matplotlib_fname()\n    757                 return fname\n    758 \n--\u003e 759     configdir = _get_configdir()\n    760     if configdir is not None:\n    761         fname = os.path.join(configdir, 'matplotlibrc')\n\nD:\\Python\\Anaconda\\lib\\site-packages\\matplotlib\\__init__.py in _get_configdir()\n    628     5. A writable directory could not be found or created; return None.\n    629     \"\"\"\n--\u003e 630     return _get_config_or_cache_dir(_get_xdg_config_dir())\n    631 \n    632 get_configdir = verbose.wrap('CONFIGDIR=%s', _get_configdir, always=False)\n\nD:\\Python\\Anaconda\\lib\\site-packages\\matplotlib\\__init__.py in _get_xdg_config_dir()\n    553     path = os.environ.get('XDG_CONFIG_HOME')\n    554     if path is None:\n--\u003e 555         path = get_home()\n    556         if path is not None:\n    557             path = os.path.join(path, '.config')\n\nD:\\Python\\Anaconda\\lib\\site-packages\\matplotlib\\__init__.py in wrapper(*args, **kwargs)\n    321         assert six.callable(func)\n    322         def wrapper(*args, **kwargs):\n--\u003e 323             ret = func(*args, **kwargs)\n    324 \n    325             if (always or not wrapper._spoke):\n\nD:\\Python\\Anaconda\\lib\\site-packages\\matplotlib\\__init__.py in _get_home()\n    507     \"\"\"\n    508     try:\n--\u003e 509         path = os.path.expanduser(\"~\")\n    510     except ImportError:\n    511         # This happens on Google App Engine (pwd module is not present).\n\nD:\\Python\\Anaconda\\lib\\ntpath.pyc in expanduser(path)\n    271         userhome = join(dirname(userhome), path[1:i])\n    272 \n--\u003e 273     return userhome + path[i:]\n    274 \n    275 \n\nUnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 13: ordinal not in range(128)\n```\n","author":{"url":"https://github.com/mmagnuski","@type":"Person","name":"mmagnuski"},"datePublished":"2014-09-14T19:02:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":17},"url":"https://github.com/3516/matplotlib/issues/3516"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:9c77d500-89ed-62a3-122e-5088b87c32cd
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8F40:355EFE:5A5472:7A9D25:6A527DE2
html-safe-nonce6ab643935f7985eb1a05aced5d32308e0912a221d4d3bbfec66f18658cd56c30
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjQwOjM1NUVGRTo1QTU0NzI6N0E5RDI1OjZBNTI3REUyIiwidmlzaXRvcl9pZCI6IjEzNzIyNzIzNDA5NjUxNjI0NjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac2184301c19b8c9f93b984ba6cbc5a277f6ba4eaac8198a367992131e900f9b43
hovercard-subject-tagissue:42727593
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/3516/issue_layout
twitter:imagehttps://opengraph.githubassets.com/549ac89d8311197700e4dd42e0f8a5790717fa31b7e0b89ef9cb615392789799/matplotlib/matplotlib/issues/3516
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/549ac89d8311197700e4dd42e0f8a5790717fa31b7e0b89ef9cb615392789799/matplotlib/matplotlib/issues/3516
og:image:altAhoy! I have recently updated matplotlib through conda to version 14.0 (np19py27_0). I am using windows 8, python 2.7.7 (Anaconda distribution 2.0.2 32-bit) Unfortunatelly my windows user name cont...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemmagnuski
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-preview
go-importgithub.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git
octolytics-dimension-user_id215947
octolytics-dimension-user_loginmatplotlib
octolytics-dimension-repository_id1385122
octolytics-dimension-repository_nwomatplotlib/matplotlib
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1385122
octolytics-dimension-repository_network_root_nwomatplotlib/matplotlib
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release07a982c1d40157c619b364352b704c3ce66bb332
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/issues/3516#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F3516
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F3516
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=matplotlib%2Fmatplotlib
Reloadhttps://github.com/matplotlib/matplotlib/issues/3516
Reloadhttps://github.com/matplotlib/matplotlib/issues/3516
Reloadhttps://github.com/matplotlib/matplotlib/issues/3516
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/3516
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/3516
Notifications https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Fork 8.4k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Star 23k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Code https://github.com/matplotlib/matplotlib
Issues 1.1k https://github.com/matplotlib/matplotlib/issues
Pull requests 408 https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality 0 https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
Code https://github.com/matplotlib/matplotlib
Issues https://github.com/matplotlib/matplotlib/issues
Pull requests https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
import error when non-ascii characters are present in cwd or user name (windows)https://github.com/matplotlib/matplotlib/issues/3516#top
topic: text/unicodehttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22topic%3A%20text%2Funicode%22
v1.4.1https://github.com/matplotlib/matplotlib/milestone/16
https://github.com/mmagnuski
mmagnuskihttps://github.com/mmagnuski
on Sep 14, 2014https://github.com/matplotlib/matplotlib/issues/3516#issue-42727593
topic: text/unicodehttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22topic%3A%20text%2Funicode%22
v1.4.1https://github.com/matplotlib/matplotlib/milestone/16
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.