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 8366249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:52:10+00:00 2026-06-09T12:52:10+00:00

Hey i’m using a python script to test functionalities on web-commerce site. I put

  • 0

Hey i’m using a python script to test functionalities on web-commerce site. I put this script on pythonanywhere site, sometimes works like 7 days in a row without problems, but there are days, like this one, when i get this error:

Logged in with test_cart
    Open http://[***]/electronics/page/1
Search ... iphone
[****************]
    File "/home/.../cart-pickup.py", line 58, in alo
    site = opener.open(url)
    File "/usr/local/lib/python2.7/urllib2.py", line 400, in open
    response = self._open(req, data)
    File "/usr/local/lib/python2.7/urllib2.py", line 418, in _open
    '_open', req)
    File "/usr/local/lib/python2.7/urllib2.py", line 378, in _call_chain
    result = func(*args)
    File "/usr/local/lib/python2.7/urllib2.py", line 1207, in http_open
    return self.do_open(httplib.HTTPConnection, req)
    File "/usr/local/lib/python2.7/urllib2.py", line 1180, in do_open
    r = h.getresponse(buffering=True)
    File "/usr/local/lib/python2.7/httplib.py", line 1030, in getresponse
    response.begin()
    File "/usr/local/lib/python2.7/httplib.py", line 407, in begin
    version, status, reason = self._read_status()
    File "/usr/local/lib/python2.7/httplib.py", line 371, in _read_status
    raise BadStatusLine(line)
    httplib.BadStatusLine: ''
    >>>         

Any ideas what might is?
Thanks in advance

  • 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-09T12:52:11+00:00Added an answer on June 9, 2026 at 12:52 pm

    You can teach your program how to recover from this situation without crashing by using try..except:

    try:
        site = opener.open(url)  # line 58 in cart-pickup.py
    except IOError: 
        print "Error: Site not loading or it isnt UP. Retrying..." 
        # return site # This will cause a NameError if site is not defined.
        return url    # Perhaps you meant this?
    except httplib.BadStatusLine:
        # log opening `url` did not succeed, or
        # queue it to be tried again, etc.
        pass
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys this is my html code: <div class=nakupy> <li class=icn_kategorie><a href=#>Nákupy</a> <div class=sub_menu>
hey guys having this really simple problem but cant seem to figure out have
Hey folks I am trying to implement a search functionality in a website using
Hey I am getting this error: error: conversion to non-scalar type requested Here are
hey guys I have the follow code in js: $(document).ready(function(){ $(.replyLink).click(function(){ $(#form-to-+this.id).html(htmlForm()).toggle(500); return false;
Hey so I've been searching around for this topic and couldn't find a whole
Hey guys I am making a terminal application using Swing and Apache Commons. I
Hey could someone help me to test if a string matches 3 double digit
Hey all i am probably overthinking this but how can i check the textbox
Hey am just curious to know if this can be done! I want to

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.