Weird error in gzip compression lesson

I’m stuck on Stage #QV8.

I reorganized my files and all of a sudden this doesn’t work anymore, not sure why, I am getting this error

remote: [tester::#QV8] Running tests for Stage #QV8 (Read request body)
remote: [tester::#QV8] $ ./your_program.sh --directory /tmp/data/codecrafters.io/http-server-tester/
remote: [tester::#QV8] $ curl -v -X POST http://localhost:4221/files/orange_pineapple_mango_mango -H "Content-Length: 69" -H "Content-Type: application/octet-stream" -d 'banana blueberry pineapple strawberry apple raspberry raspberry apple'
remote: [your_program]
remote: [your_program] thread '<unnamed>' panicked at src/routes.rs:87:58:
remote: [your_program] called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
remote: [your_program] note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
remote: [tester::#QV8] Failed to read response:
remote: [tester::#QV8] Received: "" (no content received)
remote: [tester::#QV8]            ^ error
remote: [tester::#QV8] Error: Expected: HTTP-version, Received: ""
remote: [tester::#QV8] Test failed (try setting 'debug: true' in your codecrafters.yml to see more details)

I don’t remember needing a version header in the previous challenge

@isaacfink, could you upload your code to GitHub and share the link? It will be much easier to debug if I can run it directly.

Sure here you go

@isaacfink I ran your code and logged the values of base_directory and file_path before and after this line:

It looks like file_path is already resolved by that point, so no need to concatenate it with base_directory again.

Closing this thread due to inactivity. If you still need assistance, feel free to reopen or start a new discussion!

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.