Skip to content

[Bug]: Cannot run nox without noxfile.py #356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
CakeCrusher opened this issue May 1, 2025 · 0 comments · Fixed by #363
Closed
1 task done

[Bug]: Cannot run nox without noxfile.py #356

CakeCrusher opened this issue May 1, 2025 · 0 comments · Fixed by #363

Comments

@CakeCrusher
Copy link

What happened?

Trying to make PRs where the template suggests I should run nox -s format.
In order to run that command the repo needs nox -s format which does not exist.

In short this seems to follow a similar through line with #355 where there are several CI expectations some of which conflict with each other and other (like this one) that are half developed.

I think stripping things down or polishing this process would be worthwhile.

Relevant log output

(A2A) sebas@sebas-HP-Dragonfly-13-5-inch-G4-Notebook-PC:~/Forks/A2A$ nox -s format
Traceback (most recent call last):
  File "/home/sebas/Forks/A2A/.venv/bin/nox", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/sebas/Forks/A2A/.venv/lib/python3.12/site-packages/nox/_cli.py", line 169, in main
    toml_config = load_toml(os.path.expandvars(args.noxfile), missing_ok=True)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sebas/Forks/A2A/.venv/lib/python3.12/site-packages/nox/project.py", line 63, in load_toml
    return _load_script_block(filepath, missing_ok=missing_ok)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sebas/Forks/A2A/.venv/lib/python3.12/site-packages/nox/project.py", line 75, in _load_script_block
    script = filepath.read_text(encoding="utf-8")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/pathlib.py", line 1029, in read_text
    with self.open(mode='r', encoding=encoding, errors=errors) as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/pathlib.py", line 1015, in open
    return io.open(self, mode, buffering, encoding, errors, newline)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'noxfile.py'
(A2A) sebas@sebas-HP-Dragonfly-13-5-inch-G4-Notebook-PC:~/Forks/A2A$

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants