Title: When running python scripts from fiji it is possible to have a None_writer(). · Issue #88 · scijava/scyjava · GitHub
Open Graph Title: When running python scripts from fiji it is possible to have a None_writer(). · Issue #88 · scijava/scyjava
X Title: When running python scripts from fiji it is possible to have a None_writer(). · Issue #88 · scijava/scyjava
Description: I tried to run a very simple script in headless fiji. fiji --python --headless --run hello_world.py File "python-venv/lib/python3.13/site-packages/scyjava/_script.py", line 47, in write self._writer().write(s) ^^^^^^^^^^^^^^^^^^^^ Attrib...
Open Graph Description: I tried to run a very simple script in headless fiji. fiji --python --headless --run hello_world.py File "python-venv/lib/python3.13/site-packages/scyjava/_script.py", line 47, in write self._write...
X Description: I tried to run a very simple script in headless fiji. fiji --python --headless --run hello_world.py File "python-venv/lib/python3.13/site-packages/scyjava/_script.py", line 47, in write s...
Opengraph URL: https://github.com/scijava/scyjava/issues/88
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"When running python scripts from fiji it is possible to have a None_writer().","articleBody":"\nI tried to run a very simple script in headless fiji. \n\nfiji --python --headless --run hello_world.py\n\n\u003e File \"python-venv/lib/python3.13/site-packages/scyjava/_script.py\", line 47, in write\n self._writer().write(s)\n ^^^^^^^^^^^^^^^^^^^^\nAttributeError: 'NoneType' object has no attribute 'write'\n\nThe script:\n\n import sys\n print(\"hello world\", sys.version)\n\nI checked the code, and [_script.py](https://github.com/scijava/scyjava/blob/a2b8bed0a07a87d4c9b715a6dddaad308080f440/src/scyjava/_script.py#L51) has the following line.\n\n return self._std_default if ctx is None else ctx.getWriter()\n\nIt appears that a context is created, but the context writer is None. If I change the condition\n\n if ctx is not None and ctx.getWriter() is not None:\n return ctx.getWriter()\n return self._std_default\n\nNow my script appears to work ok.","author":{"url":"https://github.com/odinsbane","@type":"Person","name":"odinsbane"},"datePublished":"2025-11-26T09:06:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/88/scyjava/issues/88"}
| 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:abd9285c-0b7c-8bd1-a201-7bf7981fab04 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ABF6:1B1D69:2D5757:3F1BBE:696A6741 |
| html-safe-nonce | 86d942557fa693c8294cd660bb4c3befb030db774cf7e389cd4bd43509d312d0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQkY2OjFCMUQ2OToyRDU3NTc6M0YxQkJFOjY5NkE2NzQxIiwidmlzaXRvcl9pZCI6Ijg2MzY0Nzc0ODM2MTMwNTQ3ODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1742d8c8c899c974bf0dd828eac51ef44c5b0bf156ef4f60fb4603654f50ef63 |
| hovercard-subject-tag | issue:3666567196 |
| 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/scijava/scyjava/88/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3e6434e59e7935bf1145c5930932e85d1809afaaa0f5c9d9bbe8eaa2b1d27a9c/scijava/scyjava/issues/88 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3e6434e59e7935bf1145c5930932e85d1809afaaa0f5c9d9bbe8eaa2b1d27a9c/scijava/scyjava/issues/88 |
| og:image:alt | I tried to run a very simple script in headless fiji. fiji --python --headless --run hello_world.py File "python-venv/lib/python3.13/site-packages/scyjava/_script.py", line 47, in write self._write... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | odinsbane |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6fea32d5b7276b841b7a803796d9715bc6cfb31ed549fdf9de2948ac25d12ba6 |
| turbo-cache-control | no-preview |
| go-import | github.com/scijava/scyjava git https://github.com/scijava/scyjava.git |
| octolytics-dimension-user_id | 1262770 |
| octolytics-dimension-user_login | scijava |
| octolytics-dimension-repository_id | 113442144 |
| octolytics-dimension-repository_nwo | scijava/scyjava |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 113442144 |
| octolytics-dimension-repository_network_root_nwo | scijava/scyjava |
| 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 | f2d9f6432a5a115ec709295ae70623f33bb80aee |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width