question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

S3 upload_file, download file do not support path-lib objects

See original GitHub issue

We should be able to use pathlib.Path in place of the local file string. Calling os.fspath would solve the issue.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
swetashrecommented, Jan 14, 2021

Reopening the issue as it has not been resolved.

0reactions
jonemocommented, Dec 17, 2022

This was addressed in https://github.com/boto/boto3/pull/2259 and released as part of version https://github.com/boto/boto3/releases/tag/1.26.32 today. Thanks to @alanyee for the contribution!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to upload a file to directory in S3 bucket using boto
And in the bucket, I have 2 folders name "dump" & "input". Now I want to copy a file from local directory to...
Read more >
cloudpathlib.S3Path
A library that implements pathlib.Path methods for URIs for different cloud providers.
Read more >
flytekit.types.file.FlyteFile - Flyte
We decided to not support pathlib.Path as an input/output type because if you wanted the automatic upload/download behavior, you should just use the ......
Read more >
How to use Boto3 to download an object from S3 using AWS ...
Use the following code to download a file from AWS S3 − ... raise Exception('Given path is not a valid s3 path.') session...
Read more >
4 Easy Ways to Upload a File to S3 Using Python - Binary Guy
One of the most common ways to upload files on your local machine to S3 is using the client class for S3. You...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found