internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: kivy/python-for-android

Issue:
Issues introduced by PR #2113 (SDL2)
As said on Discord #dev channel yesterday, PR #2113 introduces a lot of blocking issues.

These are the results of the tests done by me, @AndreMiras  and @opacam :

- `sdl2==2.0.10` have issues that have been solved by the SDL2 team, so it needs to be bumped to `2.0.12`.

- `sdl2==2.0.12` works but create freezes during runtime.

- These freezes are definitely related to the new `SDL_LockMutex` / `SDL_UnlockMutex` mechanism they added for concurrency issues.

- Commenting `SDL_LockMutex` on `Touch` related events fixes the freeze issue for non-fullscreen apps.

- On fullscreen apps, the patch it's also needed on `Resize, .. etc` events.

I'm providing an attached patch that fixes the issues on top of `2.0.12`, btw seems not a good idea to do that, so it needs some more investigation:

[disable_mutex.txt](https://github.com/kivy/python-for-android/files/4569870/disable_mutex.txt)




Discussion:
Thanks for the detailed report :hearts: 
This is also related to https://github.com/kivy/python-for-android/issues/2167
I would have no objection to applying this patch on top of 2.0.12 as a stopgap, if it seems to work. It can't be worse than just not working at all!

Resolving patch:
diff --git a/pythonforandroid/recipes/sdl2/__init__.py b/pythonforandroid/recipes/sdl2/__init__.py
--- a/pythonforandroid/recipes/sdl2/__init__.py
+++ b/pythonforandroid/recipes/sdl2/__init__.py
@@ -4,9 +4,9 @@
 
 
 class LibSDL2Recipe(BootstrapNDKRecipe):
-    version = "2.0.10"
-    url = "https://www.libsdl.org/release/SDL2-{version}.zip"
-    md5sum = "6b2e9a4a2faba4ff277062cf669724f4"
+    version = "2.0.9"
+    url = "https://www.libsdl.org/release/SDL2-{version}.tar.gz"
+    md5sum = 'f2ecfba915c54f7200f504d8b48a5dfe'
 
     dir_name = 'SDL'
 


Test patch:
Repository: kivy/python-for-android

Issue:
Provide a native service option
There is no option to include a native service (com.package.myservice) to AndroidManifest.xml, which prevents those Java services from being executed.

A CLI option --native-service, similar to --service, could allow us to specify the extra service(s) if any.


Discussion:

Resolving patch:
diff --git a/pythonforandroid/bootstraps/common/build/build.py b/pythonforandroid/bootstraps/common/build/build.py
--- a/pythonforandroid/bootstraps/common/build/build.py
+++ b/pythonforandroid/bootstraps/common/build/build.py
@@ -461,6 +461,7 @@ def make_package(args):
         "service_names": service_names,
         "android_api": android_api,
         "debug": "debug" in args.build_mode,
+        "native_services": args.native_services
     }
     if get_bootstrap_name() == "sdl2":
         render_args["url_scheme"] = url_scheme
@@ -619,6 +620,9 @@ def parse_args_and_make_package(args=None):
     ap.add_argument('--service', dest='services', action='append', default=[],
                     help='Declare a new service entrypoint: '
                          'NAME:PATH_TO_PY[:foreground]')
+    ap.add_argument('--native-service', dest='native_services', action='append', default=[],
+                    help='Declare a new native service: '
+                         'package.name.service')
     if get_bootstrap_name() != "service_only":
         ap.add_argument('--presplash', dest='presplash',
                         help=('A jpeg file to use as a screen while the '


Test patch:
Repository: kivy/python-for-android

Issue:
Cython is called in incompatible way, not all options are supported (especially -I)
<!--
The issue tracker is a tool to address bugs NOT a support platform.
Please use the Discord community or Stack Overflow for support questions,
more information at https://github.com/kivy/python-for-android#support
-->

### Checklist

- [X] the issue is indeed a bug and not a support request
- [X] issue doesn't already exist: https://github.com/kivy/python-for-android/issues
- [ ] I have a short, runnable example that reproduces the issue
- [X] I reproduced the problem with the latest development version (`p4a.branch = develop`)
- [X] I used the grave accent (aka backticks) to format code or logs when appropriated

### Versions

- Python: 3.7 (also tried with 3.8)
- OS: Ubuntu 20.04
- Kivy: 1.11.1
- Cython: git master HEAD, 0.29.21, 0.29.19
- OpenJDK: 8u265-b01-0ubuntu2~20.04

### Description

Compiling ZMQ recipe fails because cython is called in an incompatible way.

```sh
/home/rambo/.virtualenvs/py4a_37/bin/python3 -m Cython.Build.Cythonize --help
```

has different command line options from

```sh
/home/rambo/.virtualenvs/py4a_37/bin/cython --help
```

This (at least based on the recipe trying to pass -I options) is the correct script, unfortunately the `Cython.Compiler.Main` module cannot be called as a script (lack the `if __name__ == '__main__'` check so just changing the module in https://github.com/kivy/python-for-android/blob/develop/pythonforandroid/recipe.py#L1095 is not going to solve this.



### buildozer.spec

Using p4a directly

Command:
```sh
p4a apk --private `pwd` --package=fi.advian.hellokv --use-setup-py --name "Hello kivy" --version 0.1 --bootstrap=sdl2 --requirements=python3,kivy --ndk-api=21 --ndk-dir=$HOME/.buildozer/android/platform/android-ndk-r19c --sdk-dir=$HOME/.buildozer/android/platform/android-sdk/
```


### Logs

See https://gist.github.com/rambo/feab17c51a742b3d1f2239295298732b


Discussion:

Resolving patch:
diff --git a/pythonforandroid/recipe.py b/pythonforandroid/recipe.py
--- a/pythonforandroid/recipe.py
+++ b/pythonforandroid/recipe.py
@@ -1092,7 +1092,8 @@ def cythonize_file(self, env, build_dir, filename):
         python_command = sh.Command("python{}".format(
             self.ctx.python_recipe.major_minor_version_string.split(".")[0]
         ))
-        shprint(python_command, "-m", "Cython.Build.Cythonize",
+        shprint(python_command, "-c"
+                "import sys; from Cython.Compiler.Main import setuptools_main; sys.exit(setuptools_main());",
                 filename, *self.cython_args, _env=cyenv)
 
     def cythonize_build(self, env, build_dir="."):


Test patch:
Repository: kivy/python-for-android

Issue:
"diff" files are ignored during "pip install ."
in `setup.py` the "diff" is not listed: 
https://github.com/kivy/python-for-android/blob/develop/setup.py
```python
package_data = {'': ['*.tmpl',
                     '*.patch', ], }
```

and therefore this `diff` patch:
https://github.com/kivy/python-for-android/blob/develop/pythonforandroid/recipes/python3/patches/reproducible-buildinfo.diff

is not installed during `pip` invocation:
```sh
cd /tmp
git clone --depth 1 https://github.com/kivy/python-for-android.git
cd python-for-android
pip install .
```



Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,8 @@
 packages = find_packages()
 
 package_data = {'': ['*.tmpl',
-                     '*.patch', ], }
+                     '*.patch',
+                     '*.diff', ], }
 
 data_files = []
 


Test patch:
Repository: kivy/python-for-android

Issue:
Python 3.10 cffi build fails
<!--
The issue tracker is a tool to address bugs NOT a support platform.
Please use the Discord community or Stack Overflow for support questions,
more information at https://github.com/kivy/python-for-android#support
-->

### Checklist

- [ x] the issue is indeed a bug and not a support request
- [ x] issue doesn't already exist: https://github.com/kivy/python-for-android/issues
- [ x] I have a short, runnable example that reproduces the issue
- [x ] I reproduced the problem with the latest development version (`p4a.branch = develop`)
- [ x] I used the grave accent (aka backticks) to format code or logs when appropriated

### Versions

- Python: 2.10.6 (OS)
- OS: Ubuntu 22.04.2
- Kivy: 2.2.0
- Cython: 0.29.33
- OpenJDK:

### Description

p4a v2023.5.21  build of cffi fails

### buildozer.spec


Spec file:
```
requirements = python3,kivy, cffi
```

### Logs

```
/home/bobf/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -I/home/bobf/ex/hello/.buildozer/android/platform/build-arm64-v8a/build/other_builds/libffi/arm64-v8a__ndk_target_21/libffi/include -I/home/bobf/ex/hello/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include -DANDROID -I/home/bobf/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/home/bobf/ex/hello/.buildozer/android/platform/build-arm64-v8a/build/python-installs/apptest/arm64-v8a/include/python3.1 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/home/bobf/ex/hello/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include -I/home/bobf/ex/hello/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.10/c/_cffi_backend.o
c/_cffi_backend.c:407:23: error: expression is not assignable
        Py_REFCNT(ct) = 43;
        ~~~~~~~~~~~~~ ^
c/_cffi_backend.c:410:23: error: expression is not assignable
        Py_REFCNT(ct) = 0;
        ~~~~~~~~~~~~~ ^

```



Discussion:

Resolving patch:
diff --git a/pythonforandroid/recipes/cffi/__init__.py b/pythonforandroid/recipes/cffi/__init__.py
--- a/pythonforandroid/recipes/cffi/__init__.py
+++ b/pythonforandroid/recipes/cffi/__init__.py
@@ -7,7 +7,7 @@ class CffiRecipe(CompiledComponentsPythonRecipe):
     Extra system dependencies: autoconf, automake and libtool.
     """
     name = 'cffi'
-    version = '1.13.2'
+    version = '1.15.1'
     url = 'https://pypi.python.org/packages/source/c/cffi/cffi-{version}.tar.gz'
 
     depends = ['setuptools', 'pycparser', 'libffi']


Test patch:
Repository: kivy/python-for-android

Issue:
libzmq recipy build fail


### Logs

```
[1m[90m[DEBUG][39m[0m:   	  CXX      src/src_libzmq_la-router.lo
[1m[90m[DEBUG][39m[0m:   	In file included from src/mtrie.cpp:32:
[1m[90m[DEBUG][39m[0m:   	./src/generic_mtrie_impl.hpp:52:46: error: ISO C++ requires the name after '::~' to be found in the same scope as the name before '::~' [-Werror,-Wdtor-name]
[1m[90m[DEBUG][39m[0m:   	template <typename T> zmq::generic_mtrie_t<T>::~generic_mtrie_t ()
[1m[90m[DEBUG][39m[0m:   	                      ~~~~~~~~~~~~~~~~~~~~~~~^~
[1m[90m[DEBUG][39m[0m:   	                                             ::generic_mtrie_t
[1m[90m[DEBUG][39m[0m:   	  CXX      src/src_libzmq_la-scatter.lo
[1m[90m[DEBUG][39m[0m:   	1 error generated.
```



Discussion:

Resolving patch:
diff --git a/pythonforandroid/recipes/libzmq/__init__.py b/pythonforandroid/recipes/libzmq/__init__.py
--- a/pythonforandroid/recipes/libzmq/__init__.py
+++ b/pythonforandroid/recipes/libzmq/__init__.py
@@ -6,7 +6,7 @@
 
 
 class LibZMQRecipe(Recipe):
-    version = '4.3.2'
+    version = '4.3.4'
     url = 'https://github.com/zeromq/libzmq/releases/download/v{version}/zeromq-{version}.zip'
     depends = []
     built_libraries = {'libzmq.so': 'src/.libs'}
@@ -34,6 +34,7 @@ def build_arch(self, arch):
                 '--prefix={}'.format(prefix),
                 '--with-libsodium=no',
                 '--disable-libunwind',
+                '--disable-Werror',
                 _env=env)
             shprint(sh.make, _env=env)
             shprint(sh.make, 'install', _env=env)


Test patch:
Repository: kivy/python-for-android

Issue:
Fix sqlalchemy recipe
Fix sqlalchemy build errors and bump sqlalchemy from 1.3.3 to 2.0+.



Discussion:
Hi @o-murphy , is this a feature request?
> Hi @o-murphy , is this a feature request?

No, it's request to up to date library build recipe
> Fix sqlalchemy build errors and bump sqlalchemy from 1.3.3 to 2.0+.

I agree with this since sqlalchemy total revamp to 2.0 and it fully differs from 1.4.

Resolving patch:
diff --git a/pythonforandroid/recipes/sqlalchemy/__init__.py b/pythonforandroid/recipes/sqlalchemy/__init__.py
--- a/pythonforandroid/recipes/sqlalchemy/__init__.py
+++ b/pythonforandroid/recipes/sqlalchemy/__init__.py
@@ -1,15 +1,15 @@
-from pythonforandroid.recipe import CompiledComponentsPythonRecipe
+from pythonforandroid.recipe import PyProjectRecipe
 
 
-class SQLAlchemyRecipe(CompiledComponentsPythonRecipe):
+class SQLAlchemyRecipe(PyProjectRecipe):
     name = 'sqlalchemy'
-    version = '1.3.3'
-    url = 'https://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-{version}.tar.gz'
-    call_hostpython_via_targetpython = False
-
+    version = '2.0.30'
+    url = 'https://github.com/sqlalchemy/sqlalchemy/archive/refs/tags/rel_{}.tar.gz'
     depends = ['setuptools']
 
-    patches = ['zipsafe.patch']
+    @property
+    def versioned_url(self):
+        return self.url.format(self.version.replace(".", "_"))
 
 
 recipe = SQLAlchemyRecipe()


Test patch:
Repository: openai/gym

Issue:
Error try to run monitoring
When trying to run following code on Ubuntu MATE 14.04 LTS on intel i7:

```
import gym
env = gym.make("CartPole-v0")
env.monitor.start("/tmp/cartpole-experiment-1")
for i_episode in xrange(20):
    observation = env.reset()
    for t in xrange(100):
        env.render()
        print observation
        action = env.action_space.sample()
        observation, reward, done, info = env.step(action)
        if done:
            print "Episode finished after {} timesteps".format(t+1)
            break

env.monitor.close()
```

I get following error:

```
[2016-04-28 10:59:12,799] Making new env: CartPole-v0
[2016-04-28 10:59:12,800] Creating monitor directory /tmp/cartpole-experiment-1
[2016-04-28 10:59:12,801] Starting new video recorder writing to /tmp/cartpole-experiment-1/openaigym.video.0.8846.video000000.mp4
avconv version 9.18-6:9.18-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers
  built on Mar 16 2015 13:19:10 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
Traceback (most recent call last):
  File "temp.py", line 5, in <module>
    observation = env.reset()
  File "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 87, in reset
    self.monitor._after_reset(observation)
  File "/usr/local/lib/python2.7/dist-packages/gym/monitoring/monitor.py", line 237, in _after_reset
    self.video_recorder.capture_frame()
  File "/usr/local/lib/python2.7/dist-packages/gym/monitoring/video_recorder.py", line 111, in capture_frame
    self._encode_image_frame(frame)
  File "/usr/local/lib/python2.7/dist-packages/gym/monitoring/video_recorder.py", line 161, in _encode_image_frame
    self.encoder.capture_frame(frame)
  File "/usr/local/lib/python2.7/dist-packages/gym/monitoring/video_recorder.py", line 284, in capture_frame
    self.proc.stdin.write(frame.tobytes())
AttributeError: 'numpy.ndarray' object has no attribute 'tobytes'
[2016-04-28 10:59:13,196] Finished writing results. You can upload them to the scoreboard via gym.upload('/tmp/cartpole-experiment-1')
```

Clearly the frame returned by `encoder.capture_frame()` is storing returning ndarray in the `frame`. How can I solve this?
PS: Without monitor, code runs perfectly.



Discussion:

Resolving patch:
diff --git a/gym/monitoring/video_recorder.py b/gym/monitoring/video_recorder.py
--- a/gym/monitoring/video_recorder.py
+++ b/gym/monitoring/video_recorder.py
@@ -4,7 +4,7 @@
 import subprocess
 import tempfile
 import os.path
-import distutils.spawn
+import distutils.spawn, distutils.version
 import numpy as np
 import StringIO
 
@@ -281,7 +281,10 @@ def capture_frame(self, frame):
         if frame.dtype != np.uint8:
             raise error.InvalidFrame("Your frame has data type {}, but we require uint8 (i.e. RGB values from 0-255).".format(frame.dtype))
 
-        self.proc.stdin.write(frame.tobytes())
+        if distutils.version.StrictVersion(np.__version__) >= distutils.version.StrictVersion('1.9.0'):
+            self.proc.stdin.write(frame.tobytes())
+        else:
+            self.proc.stdin.write(frame.tostring())
 
     def close(self):
         self.proc.stdin.close()


Test patch:
Repository: openai/gym

Issue:
InterpretabilityCartpoleObservations-v0 environment runtime warning
Taking a single step with a random action in the InterpretabilityCartpoleObservations-v0 environment, generates the following error:

_RuntimeWarning: invalid value encountered in greater_equal
return x.shape == self.shape and (x >= self.low).all() and (x <= self.high).all()
[2016-06-14 23:08:07,331] Action '(0, array([ 0.89130833,         nan,  0.29987182,         nan]), array([ 1.18621149,         nan, -0.16961701,         nan]), array([-2.18249957,         nan,  0.26152186,         nan]), array([-1.02926596,         nan, -0.13622267,         nan]), array([-1.26488122,         nan, -0.30129903,         nan]))' is not contained within action space 'Tuple(Discrete(2), Box(4,), Box(4,), Box(4,), Box(4,), Box(4,))'._

Repro: 
import gym
env = gym.make('InterpretabilityCartpoleObservations-v0')

observation = env.reset()
action = env.action_space.sample()
observation, reward, done, _ = env.step(action)



Discussion:
This is no longer an issue with the latest pull. The environment was also renamed to 'PredictActionsCartpole-v0.'

Sorry, looking again I believe it was renamed to 'PredictObsCartpole-v0' instead of 'PredictActionsCartpole-v0,' and the issue still exists with the observation environment.

@RafaelCosman can you take a look?

Thanks @jietang, looking at this now...

Yep, @arushir, I reproduced the problem. Thanks for pointing this out.


Resolving patch:
diff --git a/gym/envs/classic_control/cartpole.py b/gym/envs/classic_control/cartpole.py
--- a/gym/envs/classic_control/cartpole.py
+++ b/gym/envs/classic_control/cartpole.py
@@ -33,7 +33,12 @@ def __init__(self):
         self.x_threshold = 2.4
 
         # Angle limit set to 2 * theta_threshold_radians so failing observation is still within bounds
-        high = np.array([self.x_threshold * 2, np.inf, self.theta_threshold_radians * 2, np.inf])
+        high = np.array([
+            self.x_threshold * 2,
+            np.finfo(np.float32).max,
+            self.theta_threshold_radians * 2,
+            np.finfo(np.float32).max])
+
         self.action_space = spaces.Discrete(2)
         self.observation_space = spaces.Box(-high, high)
 


Test patch:
Repository: openai/gym

Issue:
Invalid assert in box2d/lunar_lander.py
I'm trying to use LunarLander-v2, but I'm getting an immediate error upon instantiation:

```
>>> import gym
>>> ll = gym.make('LunarLander-v2')
[2016-06-19 04:35:14,379] Making new env: LunarLander-v2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/repo/openai/gym/gym/envs/registration.py", line 86, in make
    return spec.make()
  File "/repo/openai/gym/gym/envs/registration.py", line 62, in make
    env = cls(**self._kwargs)
  File "/repo/openai/gym/gym/envs/box2d/lunar_lander.py", line 89, in __init__
    self._reset()
  File "/repo/openai/gym/gym/envs/box2d/lunar_lander.py", line 205, in _reset
    return self._step(0)[0]
  File "/repo/openai/gym/gym/envs/box2d/lunar_lander.py", line 229, in _step
    assert self.action_space.contains(action), "%r (%s) invalid " % (action,type(action))
AttributeError: 'NoneType' object has no attribute 'contains'
>>> 
```

This seems to be caused by commit 8a545eeb5942801d94dbd36e7d8be4c696d4bdd7 by @jietang. 

Reverting to the original code solved the problem. It seems the tighter assertions did not consider that `_reset()` calls `_step` [with (0)](https://github.com/openai/gym/blob/master/gym/envs/box2d/lunar_lander.py#L205), so either _reset needs to be fixed, or the assertions changed.



Discussion:

Resolving patch:
diff --git a/gym/envs/box2d/lunar_lander.py b/gym/envs/box2d/lunar_lander.py
--- a/gym/envs/box2d/lunar_lander.py
+++ b/gym/envs/box2d/lunar_lander.py
@@ -86,13 +86,14 @@ def __init__(self):
         self.particles = []
 
         self.prev_reward = None
-        self._reset()
 
         # useful range is -1 .. +1
         high = np.array([np.inf]*8)
         # nop, fire left engine, main engine, right engine
         self.action_space = spaces.Discrete(4)
         self.observation_space = spaces.Box(-high, high)
+        
+        self._reset()
 
     def _seed(self, seed=None):
         self.np_random, seed = seeding.np_random(seed)


Test patch:
Repository: openai/gym

Issue:
Go environment does not clean up after itself
We should implement a `_close` method on the Go environment, and close all open resources. @hojonathanho mind taking?



Discussion:
Without the `_close`, there seems to be a memory leak.

As a test case one can use this:

```
import gym

def eval():
    env = gym.make("Go9x9-v0")
    env.reset()
    # Evaluate on the env
    env.close()

pop = [eval() for _ in xrange(10000)]
```

While running it, the memory should not increase.


Resolving patch:
diff --git a/gym/envs/board_game/go.py b/gym/envs/board_game/go.py
--- a/gym/envs/board_game/go.py
+++ b/gym/envs/board_game/go.py
@@ -157,13 +157,16 @@ def __init__(self, player_color, opponent, observation_type, illegal_move_mode,
 
         if self.observation_type != 'image3c':
             raise error.Error('Unsupported observation type: {}'.format(self.observation_type))
-        self.reset()
 
         shape = pachi_py.CreateBoard(self.board_size).encode().shape
         self.observation_space = spaces.Box(np.zeros(shape), np.ones(shape))
         # One action for each board position, pass, and resign
         self.action_space = spaces.Discrete(self.board_size**2 + 2)
 
+        # Filled in by _reset()
+        self.state = None
+        self.done = True
+
     def _seed(self, seed=None):
         self.np_random, seed1 = seeding.np_random(seed)
         # Derive a random seed.
@@ -190,6 +193,10 @@ def _reset(self):
         self.done = self.state.board.is_terminal or opponent_resigned
         return self.state.board.encode()
 
+    def _close(self):
+        self.opponent_policy = None
+        self.state = None
+
     def _render(self, mode="human", close=False):
         if close:
             return


Test patch:
Repository: openai/gym

Issue:
MuJoCo env Box initialization causes warnings
In gym/gym/envs/mujoco/mujoco_env.py on line 46, Box object initialization is missing dtype=np.float32 parameter which causes autodetect warning spam.


Discussion:

Resolving patch:
diff --git a/gym/envs/mujoco/mujoco_env.py b/gym/envs/mujoco/mujoco_env.py
--- a/gym/envs/mujoco/mujoco_env.py
+++ b/gym/envs/mujoco/mujoco_env.py
@@ -43,11 +43,11 @@ def __init__(self, model_path, frame_skip):
         bounds = self.model.actuator_ctrlrange.copy()
         low = bounds[:, 0]
         high = bounds[:, 1]
-        self.action_space = spaces.Box(low=low, high=high)
+        self.action_space = spaces.Box(low=low, high=high, dtype=np.float32)
 
         high = np.inf*np.ones(self.obs_dim)
         low = -high
-        self.observation_space = spaces.Box(low, high)
+        self.observation_space = spaces.Box(low, high, dtype=np.float32)
 
         self.seed()
 


Test patch: