# Hands-on Rust: Failed to Load Texture error (page 121)

**URL:** <https://forum.devtalk.com/t/hands-on-rust-failed-to-load-texture-error-page-121/37415>\
**Category:** PragProg Customers\
**Tags:** book-hands-on-rust\
**Created:** [22 January 2022 01:37 UTC](https://forum.devtalk.com/t/hands-on-rust-failed-to-load-texture-error-page-121/37415 "2022-01-22T01:37:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![oaklandgit](https://forum.devtalk.com/user_avatar/forum.devtalk.com/oaklandgit/32/3719_2.png) [@oaklandgit](https://forum.devtalk.com/u/oaklandgit)\
**Post date:** [22 January 2022 01:37 UTC](https://forum.devtalk.com/t/hands-on-rust-failed-to-load-texture-error-page-121/37415/1 "2022-01-22T01:37:31Z")

</div>

Hi,  
I completed chapter 6 but am getting the following error when running:

```auto
thread 'main' panicked at 'Failed to load texture: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" })', (my file path) /bracket-terminal-0.8.5/src/hal/gl_common/font.rs:41:18

```

I made sure I have the font (properly named) in the resources directory, and I compared the code that loads the font with the online version:

```auto
fn main() -> BError {
    let context = BTermBuilder::new()
        .with_title("Dungeon Crawler")
        .with_fps_cap(30.0)
        .with_dimensions(DISPLAY_WIDTH, DISPLAY_HEIGHT)
        .with_tile_dimensions(32, 32)
        .with_resource_path("resources/")
        .with_font("dungeonfont.png", 32, 32)
        .with_simple_console(DISPLAY_WIDTH, DISPLAY_HEIGHT, "dungeonfont.png")
        .with_simple_console_no_bg(DISPLAY_WIDTH, DISPLAY_HEIGHT, "dungeonfont.png")
        .build()?;

    main_loop(context, State::new())
}

```

Thank you for any help!

---

<div class="post-metadata">

**Author:** ![oaklandgit](https://forum.devtalk.com/user_avatar/forum.devtalk.com/oaklandgit/32/3719_2.png) [@oaklandgit](https://forum.devtalk.com/u/oaklandgit)\
**Post date:** [22 January 2022 03:05 UTC](https://forum.devtalk.com/t/hands-on-rust-failed-to-load-texture-error-page-121/37415/2 "2022-01-22T03:05:11Z")

</div>

User error. My resources folder had been nested in the source directory when it should have been one level up. 🤦‍♂️

---

<div class="post-metadata">

**Author:** ![herbert](https://forum.devtalk.com/user_avatar/forum.devtalk.com/herbert/32/1233_2.png) [@herbert](https://forum.devtalk.com/u/herbert)\
**Post date:** [22 January 2022 14:00 UTC](https://forum.devtalk.com/t/hands-on-rust-failed-to-load-texture-error-page-121/37415/3 "2022-01-22T14:00:53Z")

</div>

Glad you got it figured out! I was about to suggest that you check your folder layout.

---

<div class="post-metadata">

**Author:** ![oaklandgit](https://forum.devtalk.com/user_avatar/forum.devtalk.com/oaklandgit/32/3719_2.png) [@oaklandgit](https://forum.devtalk.com/u/oaklandgit)\
**Post date:** [23 January 2022 22:36 UTC](https://forum.devtalk.com/t/hands-on-rust-failed-to-load-texture-error-page-121/37415/4 "2022-01-23T22:36:50Z")

</div>

Thank you @herbert and for the great book.
