Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8172437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:47:08+00:00 2026-06-06T21:47:08+00:00

I need to create a small WebDAV client that just upload files on the

  • 0

I need to create a small WebDAV client that just upload files on the server.

I’ve found “requests” library that seems to be very easy to be used but I’m not able to use it properly.

The client should transfer binary files – so I’ve used the example bellow:

>>> url = 'http://IPADDR/webdav'
>>> files = {'report.xls': open('report.xls', 'rb')}

>>> r = requests.post(url, files=files)

from http://docs.python-requests.org/en/latest/user/quickstart/#post-a-multipart-encoded-file.

For me it’s not working, I have the following error:

File ".../site-packages/requests/packages/urllib3/connectionpool.py", line 260, in _make_request
  conn.request(method, url, **httplib_request_kw)
File ".../httplib.py", line 941, in request
  self._send_request(method, url, body, headers)
File ".../httplib.py", line 975, in _send_request
  self.endheaders(body)
File ".../httplib.py", line 937, in endheaders
  self._send_output(message_body)
File ".../httplib.py", line 795, in _send_output
  msg += message_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 147: ordinal not in range(128)

Should be the input file somehow encoded? (I didn’t found anything related in the “requests” documentation).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:47:09+00:00Added an answer on June 6, 2026 at 9:47 pm

    After some debugging, I’ve actually found what’s happening.

    I was able to fix the issue by removing the following import in my script:

    from __future__ import unicode_literals
    

    This import seems to cause unwanted string conversions in urllib3 (which requests relies on).
    As requests’ author explained, this issue should be filed against urllib3.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I need to create my own small DSL that would use Python to
For a small project that I'm working on I need to create a Windows
I need to create a very small ListView. Each row could have a different
I need to create a Small Window that is bound to the Big Window.
I need to create a small UITableView with cells that each contain a UISwitch
I need to create a very small add-in for MS Word 2007 which needs
I am using C# to create a small app. I need to name files
I am going to need to create a small windows application that stores basic
I need to create a tableView with customized UITableViewCell that has three small buttons
I have a need to create a small pop up information box when a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.