minerllabs / minerl

MineRL Competition for Sample Efficient Reinforcement Learning - Python Package
http://minerl.io/docs/
Other
686 stars 154 forks source link

Can't run environment without internet connection! #58

Open chenjunjie1994 opened 5 years ago

chenjunjie1994 commented 5 years ago

Hi, I fail to create an environment. My code

import matplotlib.pyplot as plt # import matplotlib.image as mpimg # import numpy as np import minerl import gym import logging logging.basicConfig(level=logging.DEBUG)

env = gym.make('MineRLNavigateDense-v0')

And the following is all I get

INFO:minerl.env.malmo:Starting Minecraft process: ['/root/anaconda3/lib/python3.7/site-packages/minerl/env/Malmo/Minecraft/launchClient.sh', '-port', '9000', '-env'] Traceback (most recent call last): File "test.py", line 11, in env = gym.make('MineRLNavigateDense-v0') File "/root/jjchen/gym-master/gym/envs/registration.py", line 156, in make return registry.make(id, kwargs) File "/root/jjchen/gym-master/gym/envs/registration.py", line 101, in make env = spec.make(kwargs) File "/root/jjchen/gym-master/gym/envs/registration.py", line 73, in make env = cls(**_kwargs) File "/root/anaconda3/lib/python3.7/site-packages/minerl/env/core.py", line 87, in init self.init() File "/root/anaconda3/lib/python3.7/site-packages/minerl/env/core.py", line 105, in init self.instance = InstanceManager.get_instance().enter() File "/root/anaconda3/lib/python3.7/contextlib.py", line 112, in enter return next(self.gen) File "/root/anaconda3/lib/python3.7/site-packages/minerl/env/malmo.py", line 73, in get_instance inst = cls._Instance(cls._get_valid_port()) File "/root/anaconda3/lib/python3.7/site-packages/minerl/env/malmo.py", line 238, in init self.launch(port, existing) File "/root/anaconda3/lib/python3.7/site-packages/minerl/env/malmo.py", line 266, in launch raise EOFError("Minecraft process finished unexpectedly") EOFError: Minecraft process finished unexpectedly

Can somebody help with it? I run it remotely

GoingMyWay commented 5 years ago

If you run it remotely, I think you can use xvfb-run to run it?

chenjunjie1994 commented 5 years ago

If you run it remotely, I think you can use xvfb-run to run it?

@GoingMyWay

I tried. But it gave the same thing... sad

chenjunjie1994 commented 5 years ago

If you run it remotely, I think you can use xvfb-run to run it?

@GoingMyWay

I run the shell file as shown '/root/anaconda3/lib/python3.7/site-packages/minerl/env/Malmo/Minecraft/launchClient.sh', '-port', '9000', '-env',

Then it shows that

Downloading https://services.gradle.org/distributions/gradle-2.14-bin.zip

Exception in thread "main" java.net.SocketException: Network is unreachable (connect failed) at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:666) at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173) at sun.net.NetworkClient.doConnect(NetworkClient.java:180) at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) at sun.net.www.protocol.https.HttpsClient.(HttpsClient.java:264) at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263) at org.gradle.wrapper.Download.downloadInternal(Download.java:58) at org.gradle.wrapper.Download.download(Download.java:44) at org.gradle.wrapper.Install$1.call(Install.java:59) at org.gradle.wrapper.Install$1.call(Install.java:46) at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65) at org.gradle.wrapper.Install.createDist(Install.java:46) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:126) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)

================== Is it because environment creating process needs to download something ?

If yes, how can I solve it ? Seems the server I use is not allowed to reach Internet...

MadcowD commented 5 years ago

@chenjunijie1994 Could you start off by updating the environment? We've made error handling more transparent in version 0.1.11:

pip3 install --upgrade minerl

Currently you need an internet connection to get the environment to start. We're working on some fix for this at the moment, but for now it would be great if you could get internet on your cluster environment.

chenjunjie1994 commented 5 years ago

@chenjunijie1994 Could you start off by updating the environment? We've made error handling more transparent in version 0.1.11:

pip3 install --upgrade minerl

Currently you need an internet connection to get the environment to start. We're working on some fix for this at the moment, but for now it would be great if you could get internet on your cluster environment.

Thanks a lot. I got error like this.

======================================

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 2.468 secs Traceback (most recent call last): File "testpy.py", line 7, in env = gym.make('MineRLNavigateDense-v0') File "/root/.local/lib/python3.7/site-packages/gym/envs/registration.py", line 183, in make return registry.make(id, kwargs) File "/root/.local/lib/python3.7/site-packages/gym/envs/registration.py", line 125, in make env = spec.make(kwargs) File "/root/.local/lib/python3.7/site-packages/gym/envs/registration.py", line 89, in make env = cls(**_kwargs) File "/root/anaconda3/lib/python3.7/site-packages/minerl/env/core.py", line 131, in init self.init(observation_space, action_space, port=port) File "/root/anaconda3/lib/python3.7/site-packages/minerl/env/core.py", line 155, in init self.instance = InstanceManager.get_instance().enter() File "/root/anaconda3/lib/python3.7/contextlib.py", line 112, in enter return next(self.gen) File "/root/anaconda3/lib/python3.7/site-packages/minerl/env/malmo.py", line 89, in get_instance inst = cls._Instance(cls._get_valid_port()) File "/root/anaconda3/lib/python3.7/site-packages/minerl/env/malmo.py", line 259, in init self.launch(port, existing) File "/root/anaconda3/lib/python3.7/site-packages/minerl/env/malmo.py", line 299, in launch raise EOFError("Minecraft process finished unexpectedly. There was an error with Malmo.") EOFError: Minecraft process finished unexpectedly. There was an error with Malmo.

@MadcowD

chenjunjie1994 commented 5 years ago

@chenjunijie1994 Could you start off by updating the environment? We've made error handling more transparent in version 0.1.11:

pip3 install --upgrade minerl

Currently you need an internet connection to get the environment to start. We're working on some fix for this at the moment, but for now it would be great if you could get internet on your cluster environment.

@MadcowD

I set a proxy for gradle. It seems work. But when I tried to start xvfb-run python script.py, it shows errors again. Is it because the machine has a GPU ? I do not have any graphics devices. Thanks.

============================================= INFO:minerl.env.malmo:Starting Minecraft process: ['/root/anaconda3/lib/python3.7/site-packages/minerl/env/Malmo/Minecraft/launchClient.sh', '-port', '9000', '-env'] 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: https://github.com/MinecraftForge/ForgeGradle
DEBUG:minerl.env.malmo:################################################# DEBUG:minerl.env.malmo: Powered by MCP unknown
DEBUG:minerl.env.malmo: http://modcoderpack.com
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 /root/.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 /root/.gradle/caches/minecraft/de/oceanlabs/mcp/mcp_snapshot/20161220/1.11.2/srgs/mcp-notch.srg DEBUG:minerl.env.malmo:Note: Writing refmap to /root/anaconda3/lib/python3.7/site-packages/minerl/env/Malmo/Minecraft/build/tmp/compileJava/compileJava-refmap.json DEBUG:minerl.env.malmo:Note: Writing searge output SRGs to /root/anaconda3/lib/python3.7/site-packages/minerl/env/Malmo/Minecraft/build/tmp/compileJava/mcp-srg.srg DEBUG:minerl.env.malmo:Note: Writing notch output SRGs to /root/anaconda3/lib/python3.7/site-packages/minerl/env/Malmo/Minecraft/build/tmp/compileJava/mcp-notch.srg DEBUG:minerl.env.malmo:Note: Writing refmap to /root/anaconda3/lib/python3.7/site-packages/minerl/env/Malmo/Minecraft/build/tmp/compileJava/compileJava-refmap.json DEBUG:minerl.env.malmo:Note: Writing searge output SRGs to /root/anaconda3/lib/python3.7/site-packages/minerl/env/Malmo/Minecraft/build/tmp/compileJava/mcp-srg.srg DEBUG:minerl.env.malmo:Note: Writing notch output SRGs to /root/anaconda3/lib/python3.7/site-packages/minerl/env/Malmo/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:[17:07:43] [main/INFO]: Extra: [] DEBUG:minerl.env.malmo:[17:07:43] [main/INFO]: Found and added coremod: com.microsoft.Malmo.OverclockingPlugin DEBUG:minerl.env.malmo:[17:07:43] [main/INFO]: Running with arguments: [--userProperties, {}, --assetsDir, /root/.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:[17:07:44] [main/INFO]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Forge Mod Loader version 13.20.0.2228 for Minecraft 1.11.2 loading DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_211, running on Linux:amd64:3.10.107-1-tlinux2-0047, installed at /usr/java/jdk1.8.0_211-amd64/jre DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Found a command line coremod : com.microsoft.Malmo.OverclockingPlugin DEBUG:minerl.env.malmo:[17:07:44] [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:[17:07:44] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.7.5 Source=file:/root/.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:[17:07:44] [main/INFO]: Compatibility level set to JAVA_8 DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Injecting location in coremod com.microsoft.Malmo.OverclockingPlugin DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Loading tweak class name org.spongepowered.asm.mixin.EnvironmentStateTweaker DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper DEBUG:minerl.env.malmo:[17:07:44] [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:[17:07:44] [main/ERROR]: FML appears to be missing any signature data. This is not a good thing DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Calling tweak class org.spongepowered.asm.mixin.EnvironmentStateTweaker DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Initialised Mixin FML Remapper Adapter with net.minecraftforge.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper@6ac4944a DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker DEBUG:minerl.env.malmo:[17:07:44] [main/INFO]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker DEBUG:minerl.env.malmo:[17:07:44] [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:[17:07:45] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:transform:58]: MALMO: Attempting to transform MinecraftServer DEBUG:minerl.env.malmo:[17:07:45] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:overclockRenderer:129]: MALMO: Found Minecraft, attempting to transform it DEBUG:minerl.env.malmo:[17:07:45] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:overclockRenderer:135]: MALMO: Found Minecraft.runGameLoop() method, attempting to transform it DEBUG:minerl.env.malmo:[17:07:45] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:overclockRenderer:150]: MALMO: Hooked into call to Minecraft.updateDisplay() DEBUG:minerl.env.malmo:[17:07:45] [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:[17:07:45] [main/INFO]: Launching wrapped minecraft {net.minecraft.client.main.Main} DEBUG:minerl.env.malmo:[17:07:45] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:transform:58]: MALMO: Attempting to transform MinecraftServer DEBUG:minerl.env.malmo:[17:07:45] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:overclockRenderer:129]: MALMO: Found Minecraft, attempting to transform it DEBUG:minerl.env.malmo:[17:07:45] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:overclockRenderer:135]: MALMO: Found Minecraft.runGameLoop() method, attempting to transform it DEBUG:minerl.env.malmo:[17:07:45] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:overclockRenderer:150]: MALMO: Hooked into call to Minecraft.updateDisplay() DEBUG:minerl.env.malmo:[17:07:45] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:transform:42]: Transformed Name: net.minecraft.client.entity.EntityPlayerSP DEBUG:minerl.env.malmo:[17:07:45] [main/INFO]: [com.microsoft.Malmo.OverclockingClassTransformer:transform:42]: Transformed Name: net.minecraft.client.entity.AbstractClientPlayer DEBUG:minerl.env.malmo:[17:07:45] [Client thread/INFO]: Setting user: Player727 DEBUG:minerl.env.malmo:[17:07:47] [Client thread/WARN]: Skipping bad option: lastServer: DEBUG:minerl.env.malmo:[17:07:47] [Client thread/INFO]: LWJGL Version: 2.9.4 DEBUG:minerl.env.malmo:[17:07:47] [Client thread/INFO]: [STDOUT]: MALMO: Attempting to transform MinecraftServer DEBUG:minerl.env.malmo:[17:07:47] [Client thread/INFO]: [STDOUT]: MALMO: Found GlStateManager, attempting to transform it DEBUG:minerl.env.malmo:[17:07:47] [Client thread/INFO]: [STDOUT]: MALMO: Found GlStateManager.bindTexture() method, attempting to transform it DEBUG:minerl.env.malmo:[17:07:47] [Client thread/INFO]: [STDOUT]: MALMO: Hooked into call to GlStateManager.bindTexture() DEBUG:minerl.env.malmo:[17:07:47] [Client thread/INFO]: [net.minecraft.init.Bootstrap:printToSYSOUT:523]: ---- Minecraft Crash Report ---- DEBUG:minerl.env.malmo:// Surprise! Haha. Well, this is awkward. DEBUG:minerl.env.malmo: DEBUG:minerl.env.malmo:Time: 6/19/19 5:07 PM DEBUG:minerl.env.malmo:Description: Initializing game DEBUG:minerl.env.malmo: DEBUG:minerl.env.malmo:java.lang.ExceptionInInitializerError DEBUG:minerl.env.malmo: at net.minecraft.client.Minecraft.setWindowIcon(Minecraft.java:629) DEBUG:minerl.env.malmo: at net.minecraft.client.Minecraft.init(Minecraft.java:429) DEBUG:minerl.env.malmo: at net.minecraft.client.Minecraft.run(Minecraft.java:352) DEBUG:minerl.env.malmo: at net.minecraft.client.main.Main.main(SourceFile:124) DEBUG:minerl.env.malmo: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) DEBUG:minerl.env.malmo: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) DEBUG:minerl.env.malmo: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) DEBUG:minerl.env.malmo: at java.lang.reflect.Method.invoke(Method.java:498) DEBUG:minerl.env.malmo: at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) DEBUG:minerl.env.malmo: at net.minecraft.launchwrapper.Launch.main(Launch.java:28) DEBUG:minerl.env.malmo: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) DEBUG:minerl.env.malmo: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) DEBUG:minerl.env.malmo: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) DEBUG:minerl.env.malmo: at java.lang.reflect.Method.invoke(Method.java:498) DEBUG:minerl.env.malmo: at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) DEBUG:minerl.env.malmo: at GradleStart.main(GradleStart.java:26) DEBUG:minerl.env.malmo:Caused by: java.lang.RuntimeException: org.lwjgl.LWJGLException: No display mode extension is available Traceback (most recent call last): File "testpy.py", line 11, in env = gym.make('MineRLNavigateDense-v0') File "/root/anaconda3/lib/python3.7/site-packages/gym/envs/registration.py", line 183, in make return registry.make(id, kwargs) File "/root/anaconda3/lib/python3.7/site-packages/gym/envs/registration.py", line 125, in make env = spec.make(kwargs) File "/root/anaconda3/lib/python3.7/site-packages/gym/envs/registration.py", line 89, in make env = cls(**_kwargs) File "/root/anaconda3/lib/python3.7/site-packages/minerl/env/core.py", line 131, in init self.init(observation_space, action_space, port=port) File "/root/anaconda3/lib/python3.7/site-packages/minerl/env/core.py", line 155, in init self.instance = InstanceManager.get_instance().enter() File "/root/anaconda3/lib/python3.7/contextlib.py", line 112, in enter return next(self.gen) File "/root/anaconda3/lib/python3.7/site-packages/minerl/env/malmo.py", line 89, in get_instance inst = cls._Instance(cls._get_valid_port()) File "/root/anaconda3/lib/python3.7/site-packages/minerl/env/malmo.py", line 259, in init self.launch(port, existing) File "/root/anaconda3/lib/python3.7/site-packages/minerl/env/malmo.py", line 290, in launch _check_for_launch_errors(line) File "/root/anaconda3/lib/python3.7/site-packages/minerl/env/malmo.py", line 509, in _check_for_launch_errors "ERROR! MineRL could not detect an X Server, Monitor, or Virtual Monitor! " RuntimeError: ERROR! MineRL could not detect an X Server, Monitor, or Virtual Monitor!

In order to run minerl environments WITHOUT A HEAD use a software renderer such as 'xvfb': xvfb-run python3 ! NOTE: xvfb conflicts with NVIDIA-drivers! ! To run headless MineRL on a system with NVIDIA-drivers, please start a ! vnc server of your choosing and then `export DISPLAY=:<insert ur vnc server #>

If you're receiving this error and there is a monitor attached, make sure your current displayvariable is set correctly: DISPLAY=:0 python3 ! NOTE: For this to work your account must be logged on the physical monitor.

If none of these steps work, please complain in the discord! If all else fails, JUST PUT THIS IN A DOCKER CONTAINER! :)

MadcowD commented 5 years ago

Hey could you make a separate issue for this? We can try and diagnose there.