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: patch-diff.githubusercontent.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:0740bd6b-f668-7a06-aa5e-5fd4a32ea86e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9C3A:2C38E5:3B7FC0D:5348499:69712C4B |
| html-safe-nonce | fa6d9ffa990e2b674e6fd2d31fb2ee08fffa5a9718fa24435e717732db8a9faf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QzNBOjJDMzhFNTozQjdGQzBEOjUzNDg0OTk6Njk3MTJDNEIiLCJ2aXNpdG9yX2lkIjoiNTUzOTM3ODcyMjU0MTQ4MTAzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b00527b8aad8a1cbc4f29ebbc5d6ff907f3ce3c29845cd61f2667ecc68b8204b |
| 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 | 235f189cb7458700436eaa6676a45f9abab16ecdfb4be6cc339f24abaa820b19 |
| 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 | e26123de62cafb036ecaec64b7f90a01b4a7f823 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width