Title: Python.Runtime causes casting errors when setting global vars · Issue #420 · pythonnet/pythonnet · GitHub
Open Graph Title: Python.Runtime causes casting errors when setting global vars · Issue #420 · pythonnet/pythonnet
X Title: Python.Runtime causes casting errors when setting global vars · Issue #420 · pythonnet/pythonnet
Description: Environment Pythonnet version: 2.2.2, strongly signed post-installation Python version: 2.7, 32bit Operating System: Windows 7, 64bit Details Describe what you were trying to get done. GLOB=1 def test_glob(): return GLOB Microsoft (R) Ro...
Open Graph Description: Environment Pythonnet version: 2.2.2, strongly signed post-installation Python version: 2.7, 32bit Operating System: Windows 7, 64bit Details Describe what you were trying to get done. GLOB=1 def t...
X Description: Environment Pythonnet version: 2.2.2, strongly signed post-installation Python version: 2.7, 32bit Operating System: Windows 7, 64bit Details Describe what you were trying to get done. GLOB=1 def t...
Opengraph URL: https://github.com/pythonnet/pythonnet/issues/420
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Python.Runtime causes casting errors when setting global vars","articleBody":"### Environment\r\n\r\n- Pythonnet version: 2.2.2, strongly signed post-installation\r\n- Python version: 2.7, 32bit\r\n- Operating System: Windows 7, 64bit\r\n\r\n### Details\r\n\r\n- Describe what you were trying to get done.\r\n\r\n```python\r\nGLOB=1\r\ndef test_glob():\r\n\treturn GLOB\r\n```\r\n\r\n```CSHARP\r\nMicrosoft (R) Roslyn C# Compiler version 1.2.0.60425\r\nLoading context from 'CSharpInteractive.rsp'.\r\nType \"#help\" for more information.\r\n\u003e #r \"C:\\Python\\Python27_32b\\Lib\\site-packages\\Python.Runtime.dll\"\r\n\u003e using Python.Runtime;\r\n\u003e dynamic test_glob; using (Py.GIL()) { test_glob = Py.Import(\"test_glob\"); }\r\n\u003e test_glob.GLOB\r\n[1]\r\n\u003e test_glob.GLOB=1\r\nUnable to cast object of type 'System.Int32' to type 'Python.Runtime.PyObject'.\r\n + Python.Runtime.PyObject.TrySetMember(System.Dynamic.SetMemberBinder, object)\r\n + System.Dynamic.UpdateDelegates.UpdateAndExecute2\u003cT0, T1, TRet\u003e(System.Runtime.CompilerServices.CallSite, T0, T1)\r\n```\r\n","author":{"url":"https://github.com/den-run-ai","@type":"Person","name":"den-run-ai"},"datePublished":"2017-03-06T22:22:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/420/pythonnet/issues/420"}
| 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:585b4d35-c566-69e8-d155-48061f25f962 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8A30:F2787:33B973:462625:696FE917 |
| html-safe-nonce | e126c6c43d4a963eda238e3a7c6a38c2e679673ceaf9f43f9b6ff1010d22b018 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QTMwOkYyNzg3OjMzQjk3Mzo0NjI2MjU6Njk2RkU5MTciLCJ2aXNpdG9yX2lkIjoiNjE3Mzk1OTkzNDM2Njk2ODA4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 41fbe82b16dea1a266e76ea493a1938ccfaa9bd2db7943feb44d276f9f1074d6 |
| hovercard-subject-tag | issue:212268794 |
| 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/pythonnet/pythonnet/420/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3afc3d89fb0d1237fa7e4b298c37fafe6d7b906cc96950b4c671ee689cfbe00b/pythonnet/pythonnet/issues/420 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3afc3d89fb0d1237fa7e4b298c37fafe6d7b906cc96950b4c671ee689cfbe00b/pythonnet/pythonnet/issues/420 |
| og:image:alt | Environment Pythonnet version: 2.2.2, strongly signed post-installation Python version: 2.7, 32bit Operating System: Windows 7, 64bit Details Describe what you were trying to get done. GLOB=1 def t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | den-run-ai |
| hostname | github.com |
| expected-hostname | github.com |
| None | bb7c872aa74896d911608183f4997f8b9c121a1624064705ec4570cd91bd7839 |
| turbo-cache-control | no-preview |
| go-import | github.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git |
| octolytics-dimension-user_id | 6050430 |
| octolytics-dimension-user_login | pythonnet |
| octolytics-dimension-repository_id | 14748123 |
| octolytics-dimension-repository_nwo | pythonnet/pythonnet |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14748123 |
| octolytics-dimension-repository_network_root_nwo | pythonnet/pythonnet |
| 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 | 257e1b418957178bd3ac9f7520608a40ebbb0f1e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width