playframework / playframework/play1

"play new" does not run

Open
#1,493 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.6k
Forks
671
Avg merge
12d 15h
Merged PRs (30d)
1

Description

Play Version

1.7.1
1.8.0

Describe the bug
play new should create a new application.
Instead the following error is displayed:

(base) philipp@Imotep /tmp % play new app1
~        _            _
~  _ __ | | __ _ _  _| |
~ | '_ \| |/ _' | || |_|
~ |  __/|_|\____|\__ (_)
~ |_|            |__/
~
~ play! 1.8.0, https://www.playframework.com
~
~ The new application will be created in /private/tmp/app1
~ What is the application name? [app1]
Traceback (most recent call last):
  File "/Users/philipp/.bin/play/play", line 168, in <module>
    status = cmdloader.commands[play_command].execute(command=play_command, app=play_app, args=remaining_args, env=play_env, cmdloader=cmdloader)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/philipp/.bin/play/framework/pym/play/commands/base.py", line 38, in execute
    new(app, args, env, cmdloader)
  File "/Users/philipp/.bin/play/framework/pym/play/commands/base.py", line 95, in new
    os.mkdir(os.path.join(app.path, 'app/models'))
FileNotFoundError: [Errno 2] No such file or directory: '/private/tmp/app1/app/models'

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

or

Please provide a PR with a failing test.

If the issue is more complex or requires configuration, please provide a link to a project on Github that reproduces the issue.

Expected behavior
The app is created

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Darwin Imotep.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 arm64
  • Browser -
  • Version -
  • JDK: OpenJDK Runtime Environment Temurin-17.0.12+7 (build 17.0.12+7)
  • Python: Python 3.12.3

Additional context
Add any other context about the problem here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with pym/play/commands/base.py, especially the new command at the traceback location, and reproduce the failure with play new app1 on the reported environment. Confirm that the command completes and creates the application directory structure instead of raising FileNotFoundError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.