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

ValueError: unacceptable mode: 'w+b' #130

Closed
DIYer22 opened this issue Mar 25, 2022 · 2 comments
Closed

ValueError: unacceptable mode: 'w+b' #130

DIYer22 opened this issue Mar 25, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@DIYer22
Copy link
Member

DIYer22 commented Mar 25, 2022

from megfile import smart_open
with smart_open('/tmp/test-open-w-p', 'w+b') as f:
    f.write(b"test")
# 正常运行

with smart_open('s3:https://yl-share/tmp/tmp/test-open-w-p', 'w+b') as f:
    f.write(b"test")
# ValueError: unacceptable mode: 'w+b'
@LoveEatCandy
Copy link
Collaborator

请先使用 “wb+”, "rb+", "ab+",后续版本会修复这个问题

@LoveEatCandy LoveEatCandy added the bug Something isn't working label Mar 29, 2022
@LoveEatCandy
Copy link
Collaborator

fixed in 1.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants