Skip to content
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

Imposible to download file into directory #143

Closed
brainmorsel opened this issue Jun 26, 2019 · 0 comments · Fixed by #144
Closed

Imposible to download file into directory #143

brainmorsel opened this issue Jun 26, 2019 · 0 comments · Fixed by #144
Labels
bug Something is wrong with the framework good first issue A good place to start contributing to this project without going too deep.

Comments

@brainmorsel
Copy link
Contributor

Context

  • Operating System: Arch Linux
  • Python Version: 3.7.3
  • aiogram version: 2.2
  • aiohttp version: 3.5.4

Expected Behavior

Able to download file into specified directory.

Current Behavior

Got IsADirectoryError exception.

Failure Information (for bugs)

Problem lay in line https://github.com/aiogram/aiogram/blob/dev-2.x/aiogram/types/mixins.py#L27:

os.path.join(destination, file.file_path)

which is noop in current context.

Steps to Reproduce

  1. Setup message handler:
async def new_photo(message: types.Message):
    await message.photo[0].download(destination='/path/to/existing/directory')
  1. Send photo to bot.
  2. Get tracelog with IsADirectoryError exception.
brainmorsel added a commit to brainmorsel/aiogram that referenced this issue Jun 26, 2019
JrooTJunior added a commit that referenced this issue Jun 26, 2019
Fix #143: Imposible to download file into directory
@JrooTJunior JrooTJunior added bug Something is wrong with the framework good first issue A good place to start contributing to this project without going too deep. labels Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong with the framework good first issue A good place to start contributing to this project without going too deep.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants