Skip to content
This repository was archived by the owner on Mar 15, 2026. It is now read-only.
This repository was archived by the owner on Mar 15, 2026. It is now read-only.

Error: IsADirectoryError on init command #41

Closed

Description

@cristianoliveira

Hi there.

We are getting the follow errors using python3:

Traceback (most recent call last):
  File "/Users/cristian.oliveira/.virtualenv/test/bin/lambda", line 53, in <module>
    cli()
  File "/Users/cristian.oliveira/.virtualenv/test/lib/python3.6/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/Users/cristian.oliveira/.virtualenv/test/lib/python3.6/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/Users/cristian.oliveira/.virtualenv/test/lib/python3.6/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/cristian.oliveira/.virtualenv/test/lib/python3.6/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/cristian.oliveira/.virtualenv/test/lib/python3.6/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/Users/cristian.oliveira/.virtualenv/test/bin/lambda", line 20, in init
    aws_lambda.init(CURRENT_DIR)
  File "/Users/cristian.oliveira/.virtualenv/test/lib/python3.6/site-packages/aws_lambda/aws_lambda.py", line 149, in init
    copy(dest_path, src)
  File "/Users/cristian.oliveira/.virtualenv/test/lib/python3.6/shutil.py", line 243, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/Users/cristian.oliveira/.virtualenv/test/lib/python3.6/shutil.py", line 122, in copyfile
    with open(src, 'rb') as fsrc:
IsADirectoryError: [Errno 21] Is a directory: '/Users/cristian.oliveira/.virtualenv/test/lib/python3.6/site-packages/aws_lambda/project_templates/__pycache__'

It is trying to copy a folder, in this case __pycache__, which I think is a wrong behavior. I have already fixed that here. I going to open a PR with the fix.

Activity

  1. added a commit that references this issue on Jun 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions