Skip to content

"play new" does not run #1493

@phaus

Description

@phaus

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions