minerl
minerl copied to clipboard
TypeError: a bytes-like object is required, not 'NoneType'
import minerl
import gym
import logging
logging.basicConfig(level=logging.DEBUG)
env = gym.make('MineRLNavigateDense-v0')
obs = env.reset()
done = False
net_reward = 0
while not done:
action = env.action_space.noop()
action['camera'] = [0, 0.03*obs["compassAngle"]]
action['back'] = 0
action['forward'] = 1
action['jump'] = 1
action['attack'] = 1
obs, reward, done, info = env.step(
action)
net_reward += reward
print("Total reward: ", net_reward)
INFO:minerl.env.malmo.instance.c17c95:Starting Minecraft process: ['D:\Anaconda\envs\minecraftrl\lib\site-packages\minerl\env\..\MCP-Reborn\launchClient.bat', '-port', '12628', '-env', '-runDir', 'D:\Anaconda\envs\minecraftrl\lib\site-packages\minerl\env\..\MCP-Reborn\run']
INFO:process_watcher:Launching process watcher daemonizer.
D:\Anaconda\envs\minecraftrl\lib\runpy.py:127: RuntimeWarning: 'minerl.utils.process_watcher' found in sys.modules after import of package 'minerl.utils', but prior to execution of 'minerl.utils.process_watcher'; this may result in unpredictable behaviour
warn(RuntimeWarning(msg))
D:\Anaconda\envs\minecraftrl\lib\runpy.py:127: RuntimeWarning: 'daemoniker._daemonize_windows' found in sys.modules after import of package 'daemoniker', but prior to execution of 'daemoniker._daemonize_windows'; this may result in unpredictable behaviour
warn(RuntimeWarning(msg))
INFO:process_watcher:Process watcher daemonizer launched successfully.
DEBUG:minerl.env.malmo.instance.c17c95:SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
DEBUG:minerl.env.malmo.instance.c17c95:SLF4J: Defaulting to no-operation (NOP) logger implementation
DEBUG:minerl.env.malmo.instance.c17c95:SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
DEBUG:minerl.env.malmo.instance.c17c95:[10:06:55] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
DEBUG:minerl.env.malmo.instance.c17c95:[10:06:58] [Render thread/INFO]: Setting user: Player593
DEBUG:minerl.env.malmo.instance.c17c95:[10:06:59] [Render thread/INFO]: Backend library: LWJGL version 3.2.2 SNAPSHOT
ERROR:minerl.env.malmo.instance.c17c95:[10:07:02] [Render thread/WARN]: ERROR : Couldn't load Narrator library : Unable to load library 'SAPIWrapper_x64': Can't obtain InputStream for win32-x86-64/SAPIWrapper_x64.dll
ERROR:minerl.env.malmo.instance.c17c95:ERROR : Couldn't load Narrator library : Unable to load library 'SAPIWrapper_x86': Can't obtain InputStream for win32-x86-64/SAPIWrapper_x86.dll
DEBUG:minerl.env.malmo.instance.c17c95:
DEBUG:minerl.env.malmo.instance.c17c95:[10:07:02] [Render thread/INFO]: Reloading ResourceManager: Default
DEBUG:minerl.env.malmo.instance.c17c95:[10:07:03] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id
DEBUG:minerl.env.malmo.instance.c17c95:[10:07:07] [Render thread/INFO]: OpenAL initialized.
DEBUG:minerl.env.malmo.instance.c17c95:[10:07:07] [Render thread/INFO]: Sound engine started
DEBUG:minerl.env.malmo.instance.c17c95:[10:07:08] [Render thread/INFO]: Created: 1024x1024x4 minecraft:textures/atlas/blocks.png-atlas
DEBUG:minerl.env.malmo.instance.c17c95:[10:07:08] [Render thread/INFO]: Created: 256x128x4 minecraft:textures/atlas/signs.png-atlas
DEBUG:minerl.env.malmo.instance.c17c95:[10:07:08] [Render thread/INFO]: Created: 1024x512x4 minecraft:textures/atlas/banner_patterns.png-atlas
DEBUG:minerl.env.malmo.instance.c17c95:[10:07:08] [Render thread/INFO]: Created: 1024x512x4 minecraft:textures/atlas/shield_patterns.png-atlas
DEBUG:minerl.env.malmo.instance.c17c95:[10:07:08] [Render thread/INFO]: Created: 256x256x4 minecraft:textures/atlas/chest.png-atlas
DEBUG:minerl.env.malmo.instance.c17c95:[10:07:08] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/beds.png-atlas
DEBUG:minerl.env.malmo.instance.c17c95:[10:07:08] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/shulker_boxes.png-atlas
DEBUG:minerl.env.malmo.instance.c17c95:[10:07:09] [Render thread/INFO]: Created: 256x256x0 minecraft:textures/atlas/particles.png-atlas
DEBUG:minerl.env.malmo.instance.c17c95:[10:07:09] [Render thread/INFO]: Created: 256x256x0 minecraft:textures/atlas/paintings.png-atlas
DEBUG:minerl.env.malmo.instance.c17c95:[10:07:09] [Render thread/INFO]: Created: 256x128x0 minecraft:textures/atlas/mob_effects.png-atlas
DEBUG:minerl.env.malmo.instance.c17c95:[10:07:10] [Thread-5/INFO]: [STDOUT]: ***** Start MalmoEnvServer on port 12628
DEBUG:minerl.env.malmo.instance.c17c95:[10:07:10] [Thread-5/INFO]: [STDOUT]: CLIENT enter state: DORMANT
INFO:minerl.env.malmo.instance.c17c95:Minecraft process ready
DEBUG:minerl.env._multiagent:Creating socket connection Malmo[None:c17c95, proc=3736, addr=localhost:12628, locked=True]
INFO:minerl.env.malmo:Logging output of Minecraft to .\logs\mc_3628.log
DEBUG:minerl.env.malmo.instance.c17c95:[10:07:10] [Thread-5/INFO]: [STDOUT]: SERVER enter state: DORMANT
DEBUG:minerl.env._multiagent:Saying hello for client: Malmo[None:c17c95, proc=3736, addr=localhost:12628, locked=True]
INFO:minerl.env._multiagent:Attempting to quit: Malmo[None:c17c95, proc=3736, addr=localhost:12628, locked=True]
DEBUG:minerl.env._multiagent:Sending mission init: Malmo[None:c17c95, proc=3736, addr=localhost:12628, locked=True]
DEBUG:minerl.env.malmo.instance.c17c95:[10:07:10] [EnvServerSocketHandler/INFO]: Received Mission token ff4c4d38-9a85-4bf2-a1f0-c98390d2264c:0:0:1:true
DEBUG:minerl.env.malmo.instance.c17c95:[10:07:10] [EnvServerSocketHandler/INFO]: Received mission init command <MissionInit xmlns="http://ProjectMalmo.microsoft.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SchemaVersion="" PlatformVersion="0.37.0"><Mission><About><Summary>MineRLNavigateDense-v0</Summary></About><ModSettings><MsPerTick>50</MsPerTick></ModSettings><ServerSection><ServerInitialConditions><Time><StartTime>6000</StartTime><AllowPassageOfTime>false</AllowPassageOfTime></Time><Weather>clear</Weather><AllowSpawning>false</AllowSpawning></ServerInitialConditions><ServerHandlers><DefaultWorldGenerator forceReset="true" generatorOptions="{}"/><NavigationDecorator><randomPlacementProperties><maxRandomizedRadius>64</maxRandomizedRadius><minRandomizedRadius>64</minRandomizedRadius><maxRadius>8</maxRadius><minRadius>0</minRadius>
Make sure MineRL installed correctly when you were installing it, and make sure you have only Java 8 and JDK 8 installed.
@AromaticHydrocarbon I am encountering the exact same issue, just wondering have you resolved this one? many thanks.
Changing the version of the JDK to JDK 8 on my Ubuntu system solved the issue. Use the command to quickly alternate the JDK.
sudo update-alternatives --config java