gym.error.UnregisteredEnv: No registered env with id: MineRLNavigateDense-v0

#1

I am trying to get the minerl library working, but I am having trouble getting it as a python file. If I use ipython I am able to run the “Hello World: Your First Agent” example, but when I put it in a python file minerl.py and run python minerl.py I get the following error:

Traceback (most recent call last):
File “~/minerl/venv/lib/python3.6/site-packages/gym/envs/registration.py”, line 132, in spec
return self.env_specs[id]
KeyError: ‘MineRLNavigateDense-v0’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “~/minerl/minerl.py”, line 2, in
import minerl
File “~/minerl/minerl.py”, line 7, in
env = gym.make(‘MineRLNavigateDense-v0’)
File “~/minerl/venv/lib/python3.6/site-packages/gym/envs/registration.py”, line 156, in make
return registry.make(id, **kwargs)
File “~/minerl/venv/lib/python3.6/site-packages/gym/envs/registration.py”, line 100, in make
spec = self.spec(path)
File “~/minerl/venv/lib/python3.6/site-packages/gym/envs/registration.py”, line 142, in spec
raise error.UnregisteredEnv(‘No registered env with id: {}’.format(id))
gym.error.UnregisteredEnv: No registered env with id: MineRLNavigateDense-v0

Process finished with exit code 1

I currently have the minerl installed in a virtual environment, but I had the same error installing to my systems base python install.

Below is the log output when I successfully created an environment in ipython (I had to remove web addresses because new users are only able to post two links per post…)

env = gym.make(‘MineRLNavigateDense-v0’)
INFO:minerl.env.malmo:Starting Minecraft process: [’/tmp/tmpgdv37qqb/Minecraft/launchClient.sh’, ‘-port’, ‘9001’, ‘-env’, ‘-runDir’, ‘/tmp/tmpgdv37qqb/Minecraft/run’]
INFO:minerl.env.malmo:Starting process watcher for process 6580 @ localhost:9001
DEBUG:minerl.env.malmo:This mapping ‘snapshot_20161220’ was designed for MC 1.11! Use at your own peril.
DEBUG:minerl.env.malmo:#################################################
DEBUG:minerl.env.malmo: ForgeGradle 2.2-SNAPSHOT-3966cea
DEBUG:minerl.env.malmo:
DEBUG:minerl.env.malmo:#################################################
DEBUG:minerl.env.malmo: Powered by MCP unknown
DEBUG:minerl.env.malmo:
DEBUG:minerl.env.malmo: by: Searge, ProfMobius, Fesh0r,
DEBUG:minerl.env.malmo: R4wk, ZeuX, IngisKahn, bspkrs
DEBUG:minerl.env.malmo:#################################################
DEBUG:minerl.env.malmo:Found AccessTransformer: malmomod_at.cfg
DEBUG:minerl.env.malmo::deobfCompileDummyTask
DEBUG:minerl.env.malmo::deobfProvidedDummyTask
DEBUG:minerl.env.malmo::getVersionJson
DEBUG:minerl.env.malmo::extractUserdev
DEBUG:minerl.env.malmo::downloadClient SKIPPED
DEBUG:minerl.env.malmo::downloadServer SKIPPED
DEBUG:minerl.env.malmo::splitServerJar SKIPPED
DEBUG:minerl.env.malmo::mergeJars SKIPPED
DEBUG:minerl.env.malmo::applyBinaryPatches SKIPPED
DEBUG:minerl.env.malmo::extractDependencyATs SKIPPED
DEBUG:minerl.env.malmo::extractMcpData SKIPPED
DEBUG:minerl.env.malmo::extractMcpMappings SKIPPED
DEBUG:minerl.env.malmo::genSrgs SKIPPED
DEBUG:minerl.env.malmo::deobfMcMCP
DEBUG:minerl.env.malmo:Applying SpecialSource…
DEBUG:minerl.env.malmo:Applying Exceptor…
DEBUG:minerl.env.malmo:Applying RuntimeInvisibleParameterAnnotations workaround…
DEBUG:minerl.env.malmo::sourceApiJava
DEBUG:minerl.env.malmo::compileApiJava UP-TO-DATE
DEBUG:minerl.env.malmo::processApiResources UP-TO-DATE
DEBUG:minerl.env.malmo::apiClasses UP-TO-DATE
DEBUG:minerl.env.malmo::copyModToClient
DEBUG:minerl.env.malmo::copyModToServer
DEBUG:minerl.env.malmo::copySrg
DEBUG:minerl.env.malmo::deleteSchemas
DEBUG:minerl.env.malmo::copySchemas
DEBUG:minerl.env.malmo::jaxb
DEBUG:minerl.env.malmo::sourceMainJava
DEBUG:minerl.env.malmo::compileJavawarning: [options] bootstrap class path not set in conjunction with -source 1.6
DEBUG:minerl.env.malmo:Note: SpongePowered MIXIN Annotation Processor Version=0.7.5
DEBUG:minerl.env.malmo:Note: ObfuscationServiceMCP supports type: “searge”
DEBUG:minerl.env.malmo:Note: ObfuscationServiceMCP supports type: “notch”
DEBUG:minerl.env.malmo:Note: Loading searge mappings from /home/cooper/.gradle/caches/minecraft/de/oceanlabs/mcp/mcp_snapshot/20161220/1.11.2/srgs/mcp-srg.srg
DEBUG:minerl.env.malmo:Note: Loading notch mappings from /home/cooper/.gradle/caches/minecraft/de/oceanlabs/mcp/mcp_snapshot/20161220/1.11.2/srgs/mcp-notch.srg
DEBUG:minerl.env.malmo:Note: Writing refmap to /tmp/tmpgdv37qqb/Minecraft/build/tmp/compileJava/compileJava-refmap.json
DEBUG:minerl.env.malmo:Note: Writing searge output SRGs to /tmp/tmpgdv37qqb/Minecraft/build/tmp/compileJava/mcp-srg.srg
DEBUG:minerl.env.malmo:Note: Writing notch output SRGs to /tmp/tmpgdv37qqb/Minecraft/build/tmp/compileJava/mcp-notch.srg
DEBUG:minerl.env.malmo:Note: Writing refmap to /tmp/tmpgdv37qqb/Minecraft/build/tmp/compileJava/compileJava-refmap.json
DEBUG:minerl.env.malmo:Note: Writing searge output SRGs to /tmp/tmpgdv37qqb/Minecraft/build/tmp/compileJava/mcp-srg.srg
DEBUG:minerl.env.malmo:Note: Writing notch output SRGs to /tmp/tmpgdv37qqb/Minecraft/build/tmp/compileJava/mcp-notch.srg
DEBUG:minerl.env.malmo:Note: Some input files use or override a deprecated API.
DEBUG:minerl.env.malmo:Note: Recompile with -Xlint:deprecation for details.
DEBUG:minerl.env.malmo:Note: Some input files use unchecked or unsafe operations.
DEBUG:minerl.env.malmo:Note: Recompile with -Xlint:unchecked for details.
DEBUG:minerl.env.malmo:
DEBUG:minerl.env.malmo::processResources
DEBUG:minerl.env.malmo::classes
DEBUG:minerl.env.malmo::jar
DEBUG:minerl.env.malmo::extractNatives SKIPPED
DEBUG:minerl.env.malmo::getAssetIndex UP-TO-DATE
DEBUG:minerl.env.malmo::getAssets
DEBUG:minerl.env.malmo::makeStart SKIPPED
DEBUG:minerl.env.malmo::runClient
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Extra: []
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Found and added coremod: com.microsoft.Malmo.OverclockingPlugin
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Running with arguments: [–userProperties, {}, --assetsDir, /home/cooper/.gradle/caches/minecraft/assets, --assetIndex, 1.11, --accessToken{REDACTED}, --version, 1.11.2, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Forge Mod Loader version 13.20.0.2228 for Minecraft 1.11.2 loading
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Java is OpenJDK 64-Bit Server VM, version 1.8.0_212, running on Linux:amd64:4.18.0-24-generic, installed at /usr/lib/jvm/java-8-openjdk-amd64/jre
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Found a command line coremod : com.microsoft.Malmo.OverclockingPlugin
DEBUG:minerl.env.malmo:[00:39:23] [main/WARN]: The coremod com.microsoft.Malmo.OverclockingPlugin does not have a MCVersion annotation, it may cause issues with this version of Minecraft
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.7.5 Source=file:/home/cooper/.gradle/caches/modules-2/files-2.1/org.spongepowered/mixin/0.7.5-SNAPSHOT/c989878008c2c5ff1a7c6491c4103d8faa221d19/mixin-0.7.5-SNAPSHOT.jar Service=LaunchWrapper Env=CLIENT
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Compatibility level set to JAVA_8
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Injecting location in coremod com.microsoft.Malmo.OverclockingPlugin
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Loading tweak class name org.spongepowered.asm.mixin.EnvironmentStateTweaker
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
DEBUG:minerl.env.malmo:[00:39:23] [main/INFO]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
DEBUG:minerl.env.malmo:[00:39:23] [main/ERROR]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
DEBUG:minerl.env.malmo:[00:39:24] [main/ERROR]: FML appears to be missing any signature data. This is not a good thing
DEBUG:minerl.env.malmo:[00:39:24] [main/INFO]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
DEBUG:minerl.env.malmo:[00:39:24] [main/INFO]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
DEBUG:minerl.env.malmo:[00:39:24] [main/INFO]: Calling tweak class org.spongepowered.asm.mixin.EnvironmentStateTweaker
DEBUG:minerl.env.malmo:[00:39:24] [main/INFO]: Initialised Mixin FML Remapper Adapter with net.minecraftforge.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper@31198ceb
DEBUG:minerl.env.malmo:[00:39:24] [main/INFO]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
DEBUG:minerl.env.malmo:[00:39:24] [main/INFO]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
DEBUG:minerl.env.malmo:[00:39:24] [main/INFO]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
DEBUG:minerl.env.malmo:[00:39:24] [main/INFO]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
DEBUG:minerl.env.malmo:[00:39:24] [main/WARN]: Reference map ‘mixins.replaymod.refmap.json’ for mixins.overclocking.malmomod.json could not be read. If this is a development environment you can ignore this message
DEBUG:minerl.env.malmo:[00:39:24] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:transform:58]: MALMO: Attempting to transform MinecraftServer
DEBUG:minerl.env.malmo:[00:39:24] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:overclockRenderer:129]: MALMO: Found Minecraft, attempting to transform it
DEBUG:minerl.env.malmo:[00:39:24] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:overclockRenderer:135]: MALMO: Found Minecraft.runGameLoop() method, attempting to transform it
DEBUG:minerl.env.malmo:[00:39:24] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:overclockRenderer:150]: MALMO: Hooked into call to Minecraft.updateDisplay()
DEBUG:minerl.env.malmo:[00:39:24] [main/INFO]: A re-entrant transformer ‘$wrapper.com.microsoft.Malmo.OverclockingClassTransformer’ was detected and will no longer process meta class data
DEBUG:minerl.env.malmo:[00:39:24] [main/INFO]: Launching wrapped minecraft {net.minecraft.client.main.Main}
DEBUG:minerl.env.malmo:[00:39:24] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:transform:58]: MALMO: Attempting to transform MinecraftServer
DEBUG:minerl.env.malmo:[00:39:24] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:overclockRenderer:129]: MALMO: Found Minecraft, attempting to transform it
DEBUG:minerl.env.malmo:[00:39:24] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:overclockRenderer:135]: MALMO: Found Minecraft.runGameLoop() method, attempting to transform it
DEBUG:minerl.env.malmo:[00:39:24] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:overclockRenderer:150]: MALMO: Hooked into call to Minecraft.updateDisplay()
DEBUG:minerl.env.malmo:[00:39:24] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:transform:42]: Transformed Name: net.minecraft.client.entity.EntityPlayerSP
DEBUG:minerl.env.malmo:[00:39:24] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:transform:42]: Transformed Name: net.minecraft.client.entity.AbstractClientPlayer
DEBUG:minerl.env.malmo:[00:39:25] [Client thread/INFO]: Setting user: Player967
DEBUG:minerl.env.malmo:[00:39:26] [Client thread/WARN]: Skipping bad option: lastServer:
DEBUG:minerl.env.malmo:[00:39:26] [Client thread/INFO]: LWJGL Version: 2.9.4
DEBUG:minerl.env.malmo:[00:39:27] [Client thread/INFO]: [STDOUT]: MALMO: Attempting to transform MinecraftServer
DEBUG:minerl.env.malmo:[00:39:27] [Client thread/INFO]: [STDOUT]: MALMO: Found GlStateManager, attempting to transform it
DEBUG:minerl.env.malmo:[00:39:27] [Client thread/INFO]: [STDOUT]: MALMO: Found GlStateManager.bindTexture() method, attempting to transform it
DEBUG:minerl.env.malmo:[00:39:27] [Client thread/INFO]: [STDOUT]: MALMO: Hooked into call to GlStateManager.bindTexture()
DEBUG:minerl.env.malmo:[00:39:27] [Client thread/INFO]: MinecraftForge v13.20.0.2228 Initialized
DEBUG:minerl.env.malmo:[00:39:27] [Client thread/INFO]: Replaced 232 ore recipes
DEBUG:minerl.env.malmo:[00:39:27] [Client thread/INFO]: Found 0 mods from the command line. Injecting into mod discoverer
DEBUG:minerl.env.malmo:[00:39:27] [Client thread/INFO]: Searching /tmp/tmpgdv37qqb/Minecraft/run/mods for mods
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/INFO]: Forge Mod Loader has identified 5 mods to load
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/INFO]: Attempting connection with missing mods [minecraft, mcp, FML, forge, malmomod] at CLIENT
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/INFO]: Attempting connection with missing mods [minecraft, mcp, FML, forge, malmomod] at SERVER
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Microsoft Malmo Mod
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/WARN]: ResourcePack: ignored non-lowercase namespace: MalmoMod in /tmp/tmpgdv37qqb/Minecraft/build/libs/MalmoMod-0.37.0.jar
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/WARN]: ResourcePack: ignored non-lowercase namespace: MalmoMod in /tmp/tmpgdv37qqb/Minecraft/build/libs/MalmoMod-0.37.0.jar
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/WARN]: ResourcePack: ignored non-lowercase namespace: MalmoMod in /tmp/tmpgdv37qqb/Minecraft/build/libs/MalmoMod-0.37.0.jar
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/INFO]: Processing ObjectHolder annotations
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/INFO]: Found 444 ObjectHolder annotations
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/INFO]: Identifying ItemStackHolder annotations
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/INFO]: Found 0 ItemStackHolder annotations
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/INFO]: Applying holder lookups
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/INFO]: Holder lookups applied
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/INFO]: Applying holder lookups
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/INFO]: Holder lookups applied
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/INFO]: Applying holder lookups
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/INFO]: Holder lookups applied
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/INFO]: Configured a dormant chunk cache size of 0
DEBUG:minerl.env.malmo:[00:39:28] [Forge Version Check/INFO]: [forge] Starting version check at
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/INFO]: [STDOUT]: Testing schemas against internal version number: 0.37
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/INFO]: Applying holder lookups
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/INFO]: Holder lookups applied
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/INFO]: Injecting itemstacks
DEBUG:minerl.env.malmo:[00:39:28] [Client thread/INFO]: Itemstack injection complete
DEBUG:minerl.env.malmo:[00:39:28] [Forge Version Check/INFO]: [forge] Found status: OUTDATED Target: 13.20.1.2386
DEBUG:minerl.env.malmo:[00:39:29] [Sound Library Loader/INFO]: Starting up SoundSystem…
DEBUG:minerl.env.malmo:[00:39:29] [Thread-6/INFO]: Initializing LWJGL OpenAL
DEBUG:minerl.env.malmo:[00:39:29] [Thread-6/INFO]: (The LWJGL binding of OpenAL. For more information, see
DEBUG:minerl.env.malmo:[00:39:29] [Thread-6/INFO]: OpenAL initialized.
DEBUG:minerl.env.malmo:[00:39:29] [Sound Library Loader/INFO]: Sound engine started
DEBUG:minerl.env.malmo:[00:39:29] [Client thread/INFO]: Max texture size: 16384
DEBUG:minerl.env.malmo:[00:39:29] [Client thread/INFO]: Created: 16x16 textures-atlas
DEBUG:minerl.env.malmo:[00:39:30] [Client thread/INFO]: [STDOUT]: CLIENT request state: WAITING_FOR_MOD_READY
DEBUG:minerl.env.malmo:[00:39:30] [Client thread/INFO]: Injecting itemstacks
DEBUG:minerl.env.malmo:[00:39:30] [Client thread/INFO]: Itemstack injection complete
DEBUG:minerl.env.malmo:[00:39:30] [Client thread/INFO]: Forge Mod Loader has successfully loaded 5 mods
DEBUG:minerl.env.malmo:[00:39:30] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Microsoft Malmo Mod
DEBUG:minerl.env.malmo:[00:39:30] [Client thread/WARN]: ResourcePack: ignored non-lowercase namespace: MalmoMod in /tmp/tmpgdv37qqb/Minecraft/build/libs/MalmoMod-0.37.0.jar
DEBUG:minerl.env.malmo:[00:39:30] [Client thread/WARN]: ResourcePack: ignored non-lowercase namespace: MalmoMod in /tmp/tmpgdv37qqb/Minecraft/build/libs/MalmoMod-0.37.0.jar
DEBUG:minerl.env.malmo:[00:39:30] [Client thread/WARN]: ResourcePack: ignored non-lowercase namespace: MalmoMod in /tmp/tmpgdv37qqb/Minecraft/build/libs/MalmoMod-0.37.0.jar
DEBUG:minerl.env.malmo:[00:39:30] [Client thread/INFO]: SoundSystem shutting down…
DEBUG:minerl.env.malmo:[00:39:30] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com
DEBUG:minerl.env.malmo:[00:39:30] [Sound Library Loader/INFO]: Starting up SoundSystem…
DEBUG:minerl.env.malmo:[00:39:31] [Thread-8/INFO]: Initializing LWJGL OpenAL
DEBUG:minerl.env.malmo:[00:39:31] [Thread-8/INFO]: (The LWJGL binding of OpenAL. For more information, see
DEBUG:minerl.env.malmo:[00:39:31] [Thread-8/INFO]: OpenAL initialized.
DEBUG:minerl.env.malmo:[00:39:31] [Client thread/INFO]: Max texture size: 16384
DEBUG:minerl.env.malmo:[00:39:31] [Client thread/INFO]: Created: 512x512 textures-atlas
DEBUG:minerl.env.malmo:[00:39:31] [Sound Library Loader/INFO]: Sound engine started
DEBUG:minerl.env.malmo:[00:39:31] [Client thread/WARN]: Skipping bad option: lastServer:
DEBUG:minerl.env.malmo:[00:39:32] [Client thread/INFO]: [STDOUT]: CLIENT enter state: WAITING_FOR_MOD_READY
DEBUG:minerl.env.malmo:[00:39:32] [Client thread/INFO]: [STDOUT]: ***** Start MalmoEnvServer on port 9001
DEBUG:minerl.env.malmo:[00:39:32] [Client thread/INFO]: [STDOUT]: CLIENT request state: DORMANT
DEBUG:minerl.env.malmo:[00:39:32] [Client thread/INFO]: [STDOUT]: CLIENT enter state: DORMANT
INFO:minerl.env.malmo:Minecraft process ready
INFO:minerl.env.malmo:Logging output of Minecraft to ./logs/minecraft_proc_9001.log

In [5]: DEBUG:minerl.env.malmo:[00:39:32] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id

#2

Have you imported minerl? Gym registration happens when the module is imported

#3

minerl.py contains:

import gym
import minerl
import logging

logging.basicConfig(level=logging.DEBUG)

env = gym.make(‘MineRLNavigateDense-v0’)
obs, _ = env.reset()

done = False
while not done:
action = env.action_space.sample()
obs, reward, done, _ = env.step(action)

For some reason the import minerl is being treated as an unused import statement. That is how pycharm shows it at least.

Here is an example of my usage. I first open ipython and run the import and environment creation command and the minecraft game window pops up. Next i run the file in ipython, the agent performs random actions until death. I then exit ipython and run it with $ python minerl.py and it throws an error.

edit: I am using ubuntu 18.04 and a freshly created anaconda environment. Another weird thing is that for some reason running the environment in ipython works until I try and run it and get the error message, then ipython no longer works either and gives the no registered env error.

(mine) cooper@linux-desktop:~/Documents/code/temp$ ipython
Python 3.7.3 (default, Mar 27 2019, 22:11:17)
Type ‘copyright’, ‘credits’ or ‘license’ for more information
IPython 7.5.0 – An enhanced Interactive Python. Type ‘?’ for help.

In [1]: import gym

In [2]: import minerl

In [3]: env = gym.make(‘MineRLNavigateDense-v0’)

In [4]: reset
Once deleted, variables cannot be recovered. Proceed (y/[n])? y

In [5]: %run ./minerl.py
INFO:minerl.env.malmo:Starting Minecraft process: [’/tmp/tmpckebrjo5/Minecraft/launchClient.sh’, ‘-port’, ‘9002’, ‘-env’, ‘-runDir’, ‘/tmp/tmpckebrjo5/Minecraft/run’]
INFO:minerl.env.malmo:Starting process watcher for process 19914 @ localhost:9002
DEBUG:minerl.env.malmo:This mapping ‘snapshot_20161220’ was designed for MC 1.11! Use at your own peril.

*** lots of log text removed for brevity***

DEBUG:minerl.env.malmo:[21:53:24] [Client thread/INFO]: [CHAT] §c§l3…
DEBUG:minerl.env.malmo:[21:53:24] [Client thread/INFO]: [CHAT] §c§l2…
DEBUG:minerl.env.malmo:[21:53:24] [Client thread/INFO]: [CHAT] §c§l1…
DEBUG:minerl.env.malmo:[21:53:24] [Server thread/INFO]: [STDOUT]: SERVER request state: CLEAN_UP
DEBUG:minerl.env.malmo:[21:53:24] [Server thread/INFO]: [STDOUT]: SERVER enter state: CLEAN_UP
DEBUG:minerl.env.malmo:[21:53:24] [Server thread/INFO]: [STDOUT]: SERVER request state: DORMANT
DEBUG:minerl.env.malmo:[21:53:24] [Client thread/INFO]: [CHAT] §c§l0…
DEBUG:minerl.env.malmo:[21:53:24] [Server thread/INFO]: [STDOUT]: SERVER enter state: DORMANT

In [6]: exit
DEBUG:minerl.env.malmo:[21:53:38] [EnvServerSocketHandler/INFO]: Java has been asked to exit (code 0) by net.minecraftforge.fml.common.FMLCommonHandler.exitJava(FMLCommonHandler.java:659).
DEBUG:minerl.env.malmo:[21:53:38] [EnvServerSocketHandler/INFO]: If this was an unexpected exit, use -Dfml.debugExit=true as a JVM argument to find out where it was called
DEBUG:minerl.env.malmo:AL lib: (EE) alc_cleanup: 1 device not closed
DEBUG:minerl.env.malmo:
DEBUG:minerl.env.malmo:BUILD SUCCESSFUL
DEBUG:minerl.env.malmo:
DEBUG:minerl.env.malmo:Total time: 1 mins 15.599 secs
INFO:minerl.env.malmo:Minecraft process psutil.Process(pid=19914, status=‘terminated’) terminated with exit code 0
[Errno 111] Connection refused
ERROR:minerl.env.malmo:Attempted to send kill command to minecraft process and failed.
INFO:minerl.env.malmo:Minecraft process psutil.Process(pid=19432, status=‘terminated’) terminated with exit code 0
(mine) cooper@linux-desktop:~/Documents/code/temp$ python minerl.py
Traceback (most recent call last):
File “/home/cooper/anaconda3/envs/mine/lib/python3.7/site-packages/gym/envs/registration.py”, line 132, in spec
return self.env_specs[id]
KeyError: ‘MineRLNavigateDense-v0’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “minerl.py”, line 2, in
import minerl
File “/home/cooper/Documents/code/temp/minerl.py”, line 7, in
env = gym.make(‘MineRLNavigateDense-v0’)
File “/home/cooper/anaconda3/envs/mine/lib/python3.7/site-packages/gym/envs/registration.py”, line 156, in make
return registry.make(id, **kwargs)
File “/home/cooper/anaconda3/envs/mine/lib/python3.7/site-packages/gym/envs/registration.py”, line 100, in make
spec = self.spec(path)
File “/home/cooper/anaconda3/envs/mine/lib/python3.7/site-packages/gym/envs/registration.py”, line 142, in spec
raise error.UnregisteredEnv(‘No registered env with id: {}’.format(id))
gym.error.UnregisteredEnv: No registered env with id: MineRLNavigateDense-v0

#4

Could you make a github issue for this! Happy to help you there :slight_smile: