Skip to content

Conversation

@k223kim
Copy link
Contributor

@k223kim k223kim commented Oct 21, 2025

I was getting this error when running the training script provided in README.md and running sumo_rl_simple.py:

Traceback (most recent call last):
  File "/teamspace/studios/this_studio/OpenEnv/src/main.py", line 18, in <module>
    result = env.step(SumoAction(phase_id=action_id))
  File "/teamspace/studios/this_studio/OpenEnv/src/core/http_env_client.py", line 136, in step
    r = self._http.post(
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/requests/sessions.py", line 637, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/requests/sessions.py", line 575, in request
    prep = self.prepare_request(req)
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/requests/sessions.py", line 484, in prepare_request
    p.prepare(
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/requests/models.py", line 370, in prepare
    self.prepare_body(data, files, json)
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/requests/models.py", line 510, in prepare_body
    body = complexjson.dumps(json, allow_nan=False)
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/json/__init__.py", line 238, in dumps
    **kw).encode(obj)
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type int64 is not JSON serializable

This PR fixes the error so that the example can run successfully.

@meta-cla
Copy link

meta-cla bot commented Oct 21, 2025

Hi @k223kim!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 21, 2025
@pankit-eng pankit-eng merged commit afa4b87 into meta-pytorch:main Oct 21, 2025
1 check passed
rycerzes pushed a commit to rycerzes/OpenEnv that referenced this pull request Nov 19, 2025
…sumo-rl-env

fix: training loop example for sumo rl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants