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

Traceback when URLerror occurs #6

Open
fwenzel opened this issue Nov 10, 2010 · 4 comments
Open

Traceback when URLerror occurs #6

fwenzel opened this issue Nov 10, 2010 · 4 comments

Comments

@fwenzel
Copy link
Member

fwenzel commented Nov 10, 2010

When the SVN server is down / broken:

Traceback (most recent call last):
  File "manage.py", line 50, in 
    execute_manager(settings)
  File "/data/devmostage_python/src/developer.mozilla.org/mdn/vendor/packages/Django/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/data/devmostage_python/src/developer.mozilla.org/mdn/vendor/packages/Django/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/data/devmostage_python/src/developer.mozilla.org/mdn/vendor/packages/Django/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/data/devmostage_python/src/developer.mozilla.org/mdn/vendor/packages/Django/django/core/management/base.py", line 218, in execute
    output = self.handle(*args, **options)
  File "/data/devmostage_python/src/developer.mozilla.org/mdn/vendor/packages/Django/django/core/management/base.py", line 347, in handle
    return self.handle_noargs(**options)
  File "/data/devmostage_python/src/developer.mozilla.org/mdn/vendor/src/django-mozilla-product-details/product_details/management/commands/update_product_details.py", line 47, in handle_noargs
    json_files = self.get_file_list()
  File "/data/devmostage_python/src/developer.mozilla.org/mdn/vendor/src/django-mozilla-product-details/product_details/management/commands/update_product_details.py", line 95, in get_file_list
    if e.code == httplib.NOT_MODIFIED:
AttributeError: 'URLError' object has no attribute 'code'
@kumar303
Copy link

This seems to happen a lot, I guess due to Teh Internet.

@kumar303
Copy link

Here's another one probably caused by network hiccups

Traceback (most recent call last):
  File "manage.py", line 97, in <module>
    call_command('update_product_details')
  File "/home/vagrant/project/vendor/src/django/django/core/management/__init__.py", line 166, in call_command
    return klass.execute(*args, **defaults)
  File "/home/vagrant/project/vendor/src/django/django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)
  File "/home/vagrant/project/vendor/src/django/django/core/management/base.py", line 351, in handle
    return self.handle_noargs(**options)
  File "/home/vagrant/project/vendor/src/django-mozilla-product-details/product_details/management/commands/update_product_details.py", line 54, in handle_noargs
    os.path.join(self.PROD_DETAILS_DIR, 'regions/'))
  File "/home/vagrant/project/vendor/src/django-mozilla-product-details/product_details/management/commands/update_product_details.py", line 71, in download_directory
    if not self.download_json_file(src, dest, json_file):
  File "/home/vagrant/project/vendor/src/django-mozilla-product-details/product_details/management/commands/update_product_details.py", line 168, in download_json_file
    urljoin(src, json_file)).read())
  File "/usr/lib/python2.6/urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.6/urllib2.py", line 391, in open
    response = self._open(req, data)
  File "/usr/lib/python2.6/urllib2.py", line 409, in _open
    '_open', req)
  File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.6/urllib2.py", line 1161, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.6/urllib2.py", line 1134, in do_open
    r = h.getresponse()
  File "/usr/lib/python2.6/httplib.py", line 986, in getresponse
    response.begin()
  File "/usr/lib/python2.6/httplib.py", line 391, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.6/httplib.py", line 355, in _read_status
    raise BadStatusLine(line)
httplib.BadStatusLine

@fwenzel
Copy link
Member Author

fwenzel commented Jun 11, 2012

What should we do here, catch it? And do what?

Seems to me like a traceback is pretty much what we want to happen so this doesn't fail silently?

@kumar303
Copy link

I'm not sure. I have seen a lot of problems with seeding the product details lib and I'm not sure exactly why. Maybe it's our SVN server. It got so bad that I switched it to this bash script and got a huge speedup: https://github.com/mozilla/zamboni/blob/master/scripts/seed-prod-details.sh (I guess because it does svn export).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants