Title: Max recursion errors for mathtext on Python 3.6 / OSX · Issue #7799 · matplotlib/matplotlib · GitHub
Open Graph Title: Max recursion errors for mathtext on Python 3.6 / OSX · Issue #7799 · matplotlib/matplotlib
X Title: Max recursion errors for mathtext on Python 3.6 / OSX · Issue #7799 · matplotlib/matplotlib
Description: See: MacPython/matplotlib-wheels#3 Errors occur testing 1.5.3 and current v2.x branch on Python 3.6, OSX. ====================================================================== ERROR: matplotlib.tests.test_mathtext.test_mathtext_cm_53.te...
Open Graph Description: See: MacPython/matplotlib-wheels#3 Errors occur testing 1.5.3 and current v2.x branch on Python 3.6, OSX. ====================================================================== ERROR: matplotlib.te...
X Description: See: MacPython/matplotlib-wheels#3 Errors occur testing 1.5.3 and current v2.x branch on Python 3.6, OSX. ====================================================================== ERROR: matplotlib.te...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/7799
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Max recursion errors for mathtext on Python 3.6 / OSX","articleBody":"See: https://github.com/MacPython/matplotlib-wheels/issues/3\r\n\r\nErrors occur testing 1.5.3 and current `v2.x` branch on Python 3.6, OSX.\r\n\r\n```\r\n======================================================================\r\nERROR: matplotlib.tests.test_mathtext.test_mathtext_cm_53.test\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n File \"/Users/travis/build/MacPython/matplotlib-wheels/venv/lib/python3.6/site-packages/nose/case.py\", line 198, in runTest\r\n self.test(*self.arg)\r\n File \"/Users/travis/build/MacPython/matplotlib-wheels/venv/lib/python3.6/site-packages/matplotlib/testing/decorators.py\", line 53, in failer\r\n result = f(*args, **kwargs)\r\n File \"/Users/travis/build/MacPython/matplotlib-wheels/venv/lib/python3.6/site-packages/matplotlib/testing/decorators.py\", line 207, in do_test\r\n figure.savefig(actual_fname, **self._savefig_kwarg)\r\n File \"/Users/travis/build/MacPython/matplotlib-wheels/venv/lib/python3.6/site-packages/matplotlib/figure.py\", line 1563, in savefig\r\n\r\n[snip]\r\n\r\n File \"/Users/travis/build/MacPython/matplotlib-wheels/venv/lib/python3.6/site-packages/pyparsing.py\", line 1510, in _parseCache\r\n value = cache.get(lookup)\r\n File \"/Users/travis/build/MacPython/matplotlib-wheels/venv/lib/python3.6/site-packages/pyparsing.py\", line 1459, in get\r\n return cache.get(key, not_in_cache)\r\nRecursionError: maximum recursion depth exceeded\r\n```\r\n\r\nhttps://s3.amazonaws.com/archive.travis-ci.org/jobs/187592465/log.txt\r\n\r\nFurther investigation reveals:\r\n\r\n* error does not occur when running the individual mathtext tests, e.g. with `python tests.py matplotlib.tests.test_mathtext`, but only when running these tests as part of a full test suite `python tests.py`;\r\n* when dropping into the debugger on the test failure - `python tests.py --pdb` - this sequence of commands also cause the recursion error:\r\n\r\n```\r\nfrom matplotlib.font_manager import FontProperties\r\nfrom matplotlib import mathtext as mt\r\n\r\nmy_p = mt.Parser()\r\nbackend = mt.MathtextBackendPath()\r\nfont_output = mt.BakomaFonts(FontProperties(), backend)\r\nmy_str = '$\\\\sqrt{1+\\\\sqrt{1+\\\\sqrt{1+\\\\sqrt{1+\\\\sqrt{1+\\\\sqrt{1+\\\\sqrt{1+x}}}}}}}$'\r\nmy_p._state_stack = [my_p.State(font_output, 'default', 'rm', 100, 72)]\r\nmy_p._em_width_cache = {}\r\nresult = my_p._expression.parseString(my_str)\r\nprint(result)\r\n```\r\n\r\nThe same sequence of commands run on its own in Python 3.6, passes.\r\n\r\nThis string also generates the recursion errors, when dropped into the debugger:\r\n\r\n```\r\nr'$\\cos{1 + \\sqrt{1 + \\sqrt{1 + \\sqrt{1 + \\sqrt{1 + \\sqrt{1+\\cos{1+x}}}}}}}$'\r\n```\r\n\r\nbut not:\r\n\r\n```\r\nr'$\\cos{1 + \\sqrt{1 + \\sqrt{1 + \\sqrt{1 + \\sqrt{1 + \\cos{1+\\cos{1+x}}}}}}}$'\r\nr'$\\cos{1 + \\cos{1 + \\cos{1 + \\cos{1 + \\cos{1 + \\cos{1+\\cos{1+x}}}}}}}$'\r\nr'$\\sqrt{1 + \\sqrt{1 + \\sqrt{1 + \\sqrt{1 + \\sqrt{1+\\sqrt{1+x}}}}}}$'\r\n```\r\n\r\nIt looks like there is some horrible global state in the MathText module or pyparsing that is being triggered only under certain circumstances.\r\n\r\n@mdboom - can you reproduce? Any insights into the problem?","author":{"url":"https://github.com/matthew-brett","@type":"Person","name":"matthew-brett"},"datePublished":"2017-01-11T05:32:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":13},"url":"https://github.com/7799/matplotlib/issues/7799"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3312208f-3564-f152-c569-9dfea0313c70 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8078:37F578:76A2A1:AC1E7F:6A55EBF3 |
| html-safe-nonce | 81920af8ac08c2face2dafb0dc1cf9d821a3f88b57133f9c1b8bc871549c9d22 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDc4OjM3RjU3ODo3NkEyQTE6QUMxRTdGOjZBNTVFQkYzIiwidmlzaXRvcl9pZCI6IjMzNjYwNDA4OTYxNDc5NDIzODciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b43f905b63bd85b00a1d93c083c49587092d8cb560b8448e7b9125af64324051 |
| hovercard-subject-tag | issue:200007089 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/7799/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b4ef4b3cd614b6caa8f4995ebe922a247d44c9757cf0df77cb0dde6849e6da54/matplotlib/matplotlib/issues/7799 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b4ef4b3cd614b6caa8f4995ebe922a247d44c9757cf0df77cb0dde6849e6da54/matplotlib/matplotlib/issues/7799 |
| og:image:alt | See: MacPython/matplotlib-wheels#3 Errors occur testing 1.5.3 and current v2.x branch on Python 3.6, OSX. ====================================================================== ERROR: matplotlib.te... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | matthew-brett |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3725c7f9b2a6e3a27ef57c5aed13428c0f65e045 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width