I’m stuck on Stage #ry8 (Scanning: Empty file)
I’ve uncommented the code like it said in step 2, committed and pushed the code .
Here are my logs:
[build] Starting build...
remote: [build] If you don't see logs for 60s+, please contact us at hello@codecrafters.io
remote: [build] Step 1 complete.
remote: [build] Step 2 complete.
remote: [build] Step 3 complete.
remote: [build] Step 4 complete.
remote: [build] Step 5 complete.
remote: [build] Step 6 complete.
remote: [build] Step 7 complete.
remote: [build] Step 8 complete.
remote: [build] Step 9 complete.
remote: [build] Step 10 complete.
remote: [build] Step 9 complete.
remote: [build] Step 11 complete.
remote: [build] Step 12 complete.
remote: [build] Step 13 complete.
remote: [build] Step 14 complete.
remote: [build] > Creating a virtualenv for this project...
remote: [build] > Pipfile: /app/Pipfile
remote: [build] > Using /usr/local/bin/python (3.12.5) to create virtualenv...
remote: [build] > created virtual environment CPython3.12.5.final.0-64 in 200ms
remote: [build] > creator CPython3Posix(dest=/venvs/app-4PlAip0Q, clear=False, no_vcs_ignore=False, global=False)
remote: [build] > seeder FromAppData(download=False, pip=bundle, via=copy, app_data_dir=/root/.local/share/virtualenv)
remote: [build] > added seed packages: pip==24.1
remote: [build] > activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
remote: [build] >
remote: [build] > ✔ Successfully created virtual environment!
remote: [build] > Virtualenv location: /venvs/app-4PlAip0Q
remote: [build] > To activate this project's virtualenv, run pipenv shell.
remote: [build] > Alternatively, run a command inside the virtualenv with pipenv run.
remote: [build] > To activate this project's virtualenv, run pipenv shell.
remote: [build] > Alternatively, run a command inside the virtualenv with pipenv run.
remote: [build] > Installing dependencies from Pipfile.lock (c0c5a6)...
remote: [build] Step 15 complete.
remote: [build] Step 16 complete.
remote: [build] Step 17 complete.
remote: [build] Step 18 complete.
remote: [build] Step 19 complete.
remote: [build] Step 21 complete.
remote: [build] Error: failed to push registry.fly.io/repo-a8de834e-d6bf-4418-bbc3-79b70efc0ad9:latest: unexpected status from POST request to https://registry.fly.io/v2/repo-a8de834e-d6bf-4418-bbc3-79b70efc0ad9/blobs/uploads/: 404 Not Found.
And here’s a snippet of my code:
import sys
def main():
if len(sys.argv) < 3:
print("Usage: ./your_program.sh tokenize <filename>", file=sys.stderr)
exit(1)
command = sys.argv[1]
filename = sys.argv[2]
if command != "tokenize":
print(f"Unknown command: {command}", file=sys.stderr)
exit(1)
with open(filename) as file:
file_contents = file.read()
# Uncomment this block to pass the first stage
if file_contents:
raise NotImplementedError("Scanner not implemented")
else:
print("EOF null") # Placeholder, remove this line when implementing the scanner
if __name__ == "__main__":
main()