You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Google Colab中VizDoom 1.1.7加载basic.cfg遇FileDoesNotExistException

Fixing ViZDoom FileDoesNotExistException on Google Colab

Hey there, I’ve run into this exact issue before when working with ViZDoom on Colab—let’s get this sorted out quickly!

The root problem here is straightforward: Google Colab starts with a clean, empty working directory, and it doesn’t come pre-loaded with ViZDoom’s sample config/wad files like basic.cfg or basic.wad. You need to manually download these files first before your code can find them.

Here are two simple ways to fix this:

Option 1: Download individual files directly

Use wget to pull just the files you need into your Colab workspace:

# Download the basic config file
!wget https://raw.githubusercontent.com/mwydmuch/ViZDoom/master/examples/scenarios/basic.cfg
# Download the corresponding WAD file
!wget https://raw.githubusercontent.com/mwydmuch/ViZDoom/master/examples/scenarios/basic.wad

Once these are downloaded, your original code will work exactly as written, since the files are now in your current working directory. You can verify they’re there by running !ls to list the contents of your workspace.

Option 2: Clone the entire ViZDoom repository

If you plan to use more sample scenarios later, cloning the full repo saves you from downloading files one by one:

!git clone https://github.com/mwydmuch/ViZDoom.git

Then just update your code to point to the correct path inside the cloned repo:

from vizdoom import *
game = DoomGame()
# Use the full path to the cfg file in the cloned repo
game.load_config("ViZDoom/examples/scenarios/basic.cfg")
# Do the same for the WAD file
game.set_doom_scenario_path("ViZDoom/examples/scenarios/basic.wad")
game.init()

Either method should resolve the FileDoesNotExistException immediately. Just make sure you run the download/clone commands before executing your ViZDoom setup code!

内容的提问来源于stack exchange,提问作者Owase Sayyad

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.13 08:00:35