NetLogo / NetLogo/Python-Extension

Py:run unable read child process output

Open
#27 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
31
Forks
16
PR merge metrics
No merged PRs in 30d

Description

Environment: Netlogo 6.3.0
I have tried on Python version 3.11, 3.10 and 3.9.13.

Netlogo is unable to read the code written in python, even the code is put in py:run.
But it works on other's pc. Not sure why this error happens :(

Error code:
Extension exception: Unable to read child process output. Try running the command again
error while manufacturer 21536 running PY:RUN
called by procedure CALIBRATION-GETLEARINGRATE (C:\Users\Joule\Desktop\ev market model 0331\manufacturer.nls)
called by procedure SETUP-MANUFACTURER (C:\Users\Joule\Desktop\ev market model 0331\manufacturer.nls)
called by procedure SETUP
called by Button 'setup'

org.nlogo.nvm.WrappedExtensionException: Extension exception: Unable to read child process output. Try running the command again
at org.nlogo.prim._extern.perform(_extern.java:40)
at org.nlogo.nvm.Context.runExclusive(Context.java:133)
at org.nlogo.nvm.ExclusiveJob.run(ExclusiveJob.scala:39)
at org.nlogo.nvm.Context.runExclusiveJob(Context.java:177)
at org.nlogo.prim._createturtles.perform(_createturtles.java:56)
at org.nlogo.nvm.Context.stepConcurrent(Context.java:107)
at org.nlogo.nvm.ConcurrentJob.step(ConcurrentJob.scala:65)
at org.nlogo.job.JobThread.runPrimaryJobs(JobThread.scala:133)
at org.nlogo.job.JobThread.$anonfun$run$1(JobThread.scala:68)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at scala.util.control.Exception$Catch.apply(Exception.scala:228)
at org.nlogo.api.Exceptions$.handling(Exceptions.scala:41)
at org.nlogo.job.JobThread.run(JobThread.scala:66)
Caused by: org.nlogo.api.ExtensionException: Unable to read child process output. Try running the command again
at org.nlogo.languagelibrary.Subprocess.receive(Subprocess.scala:432)
at org.nlogo.languagelibrary.Subprocess.$anonfun$exec$4(Subprocess.scala:225)
at org.nlogo.languagelibrary.Subprocess.$anonfun$async$1(Subprocess.scala:410)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)

NetLogo 6.3.0
main: org.nlogo.app.AppFrame
thread: JobThread
OpenJDK 64-Bit Server VM 17.0.3 (BellSoft; 17.0.3+7-LTS)
operating system: Windows 11 10.0 (amd64 processor)
Scala version 2.12.16
JOGL: (3D View not initialized)
OpenGL Graphics: (3D View not initialized)
model: main

02:15:56.944 SwitchedTabsEvent (org.nlogo.app.Tabs) AWT-EventQueue-0
02:15:56.934 RuntimeErrorEvent (org.nlogo.app.App$$anon$4 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
02:15:56.923 JobRemovedEvent (org.nlogo.app.App$$anon$4 (org.nlogo.window.GUIWorkspace)) JobThread
02:15:56.920 OutputEvent (org.nlogo.app.App$$anon$4 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
02:15:56.919 OutputEvent (org.nlogo.app.App$$anon$4 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
02:15:56.917 OutputEvent (org.nlogo.app.App$$anon$4 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
02:15:56.915 OutputEvent (org.nlogo.app.App$$anon$4 (org.nlogo.window.GUIWorkspace)) AWT-EventQueue-0
02:15:56.843 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
02:15:56.843 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
02:15:56.843 InterfaceGlobalEvent (org.nlogo.app.interfacetab.InterfacePanel$$anon$1 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the py:run failure on Windows 11 with the reported NetLogo and Python versions. Inspect the child-process handling around Subprocess.scala:432, especially receive, using the provided stack trace as the entry point. Done means the reported setup can read child-process output reliably or the failure is narrowed to a documented environment condition.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, scala
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.