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

  • Home
  • SEARCH
  • 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 953377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:02:33+00:00 2026-05-16T00:02:33+00:00

here is my code #!/usr/bin/python # -*- coding:utf-8 -*- import sys import pysvn def

  • 0

here is my code

#!/usr/bin/python
# -*- coding:utf-8 -*-
import sys
import pysvn
def main():
    client = pysvn.Client()
    client.callback_get_login = lambda realm, username, may_save:(True, "myusername", "mypasswd", True)
    print client.cat('http://svn.mydomain.com/file1.py')
    print client.cat('http://svn.mydomain.com/file2.py')
    return 0

if __name__ == "__main__":
    sys.exit(main())

and I noticed that pysvn established two HTTP sessions, but in each session, it first tried a OPTION method without the “Authorization” header, after the server response 401, it sent “Authorization” header.

Since the two url is in the same domain, why not pysvn send the username/passwd directly in the subsequence sessions?

I have this question because I’m suspecting that too much 401 made my svn server failed to response. And the svnkit in eclipse works just fine and send “Authorization” header automatic.

Edit:
to Alex Martelli:

try passing an explicit path to a known-to-be-writable config dir when you call Client.

tried, not work

it may be that the serving is sending different realms for the two files

the realms of two response is the same.

It looks like pysvn calls “svn_client_cat2()” from libsvn and this function does not cache username/passwd between invoking even for the same url and same realms.
So I don’t think I can do any more to this problem, adding new interface to libsvn and cache username/passwd for future actions will cost too much time for my task. Thanks anyway!

  • 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-05-16T00:02:34+00:00Added an answer on May 16, 2026 at 12:02 am

    Looks like (bug hypothesis number one) the configuration directory might be not writable — try passing an explicit path to a known-to-be-writable config dir when you call Client.

    If that doesn’t help (bug hypothesis number two) it may be that the serving is sending different realms for the two files (the fact that it’s the same domain doesn’t stop the server from doing that, though it would be a peculiar configuration choice or configuration error on the server’s part… but then a server that fails due to “too many 401s” does have something peculiar anyway, so it’s a suspect already;-).

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

Sidebar

Ask A Question

Stats

  • Questions 511k
  • Answers 511k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You need to split your lines using .split("\n") function, with… May 16, 2026 at 5:15 pm
  • Editorial Team
    Editorial Team added an answer I go back and forth with stuff like this. Before… May 16, 2026 at 5:15 pm
  • Editorial Team
    Editorial Team added an answer setProperty merely updates the set of properties, it does not… May 16, 2026 at 5:15 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Here's the code in question: #!/usr/bin/python import pycurl c = pycurl.Curl() values = [
I have the following code: #!/usr/bin/env python import sys from PyQt4 import QtGui, QtCore
The code #!/usr/bin/env python import MySQLdb print Content-Type: text/html print print <html><head><title>Books</title></head> print <body>
I'm trying to work out what's not working in this code: #!/usr/bin/python import cmd
I'm using Python 2.5. What is going on here? What have I misunderstood? How
Here is the code of my simple tray application. It crashes with segfault when
I am trying to implement hash_multimap in C++. Here is the code: #include <hash_map>
Here is the error: Exception in thread main java.lang.NoClassDefFoundError: org/alicebot/server/net/AliceServer Caused by: java.lang.ClassNotFoundException: org.alicebot.server.net.AliceServer
I am calling a python script from PHP. The python program has to return
I'm not used to doing things the python way yet, but I'm almost certain

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.