Ask Your Question
0

rosmake failed : AttributeError: 'NoneType' object has no attribute 'timeout'

asked 2011-07-28 10:31:55 -0500

Willy Lambert gravatar image

I do'nt know what I changed but since a short time rosmake doesn't want to work anymore. Note that I am using a Dedian squeeze 6.0.1 2.6.35.7 64b with Electric (so it may be an electric issue, but I really don't think it is).

here is the complete log :

ard@ard-host:/media/data/ros_electric/ard$ rosmake arp_master [ rosmake ] Packages requested are: ['arp_master'] [ rosmake ] Logging to directory/opt/ros/rosmake/rosmake_output-20110728-225747 [ rosmake ] Expanded args ['arp_master'] to: ['arp_master']
[ rosmake ] Checking rosdeps compliance for packages arp_master. This may take a few seconds.
Traceback (most recent call last):
File "/media/data/ros_electric/ros/bin/rosmake", line 63, in <module> if rma.main(): File "/media/data/ros_electric/ros/tools/rosmake/src/rosmake/rosmake.py", line 857, in main self.rosdep_check_result = self.check_rosdep(buildable_packages) File "/media/data/ros_electric/ros/tools/rosmake/src/rosmake/rosmake.py", line 288, in check_rosdep failed_rosdeps = r.check() File "/media/data/ros_electric/ros/tools/rosdep/src/rosdep/core.py", line 463, in check if not self.install_rosdep(r, rdlp, default_yes=False, execute=False, display=display):
File "/media/data/ros_electric/ros/tools/rosdep/src/rosdep/core.py", line 539, in install_rosdep my_installer = installer(rosdep_dict[mode]) File "/media/data/ros_electric/ros/tools/rosdep/src/rosdep/installers.py", line 133, in __init__ contents = fetch_file(self.alt_url, self.md5sum) File "/media/data/ros_electric/ros/tools/rosdep/src/rosdep/installers.py", line 80, in fetch_file fh= urllib2.urlopen(url) 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 382, in open req.timeout = timeout AttributeError: 'NoneType' object has no attribute 'timeout' Traceback (most recent call last): File "/media/data/ros_electric/ros/bin/rosmake", line 63, in <module> if rma.main(): File "/media/data/ros_electric/ros/tools/rosmake/src/rosmake/rosmake.py", line 857, in main self.rosdep_check_result = self.check_rosdep(buildable_packages) File "/media/data/ros_electric/ros/tools/rosmake/src/rosmake/rosmake.py", line 288, in check_rosdep failed_rosdeps = r.check() File "/media/data/ros_electric/ros/tools/rosdep/src/rosdep/core.py", line 463, in check if not self.install_rosdep(r, rdlp, default_yes=False, execute=False, display=display):
File "/media/data/ros_electric/ros/tools/rosdep/src/rosdep/core.py", line 539, in install_rosdep my_installer = installer(rosdep_dict[mode]) File "/media/data/ros_electric/ros/tools/rosdep/src/rosdep/installers.py", line 133, in __init__ contents = fetch_file(self.alt_url, self.md5sum) File "/media/data/ros_electric/ros/tools/rosdep/src/rosdep/installers.py", line 80, in fetch_file fh= urllib2.urlopen(url) 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 382, in open req.timeout = timeout AttributeError: 'NoneType' object has no attribute 'timeout'

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2011-07-28 19:51:55 -0500

Willy Lambert gravatar image

hmmm, this is going in a pain way :( What is surprising is that is used to work. I did something like editing a manifest and rebuild. I may have problem with locales again (fr).

Did python switched to from 2.5 to 2.6 ? (I can't find the ros wiki page with the listed versions of core dependencies of ROS distribs).

None for a timeout here, afaik, is a special value that would set the socket in blocking mode. Is it done on purpose ?

edit flag offensive delete link more

Comments

It suddenly switched back into a working state, and I didn't do anything on purpose that could explain that.
Willy Lambert gravatar imageWilly Lambert ( 2011-07-28 19:57:16 -0500 )edit
0

answered 2011-07-28 12:16:37 -0500

tfoote gravatar image

It's weird to say it but this looks like a bug in your urllib2 implementation. Somehow socket._GLOBAL_DEFAULT_TIMEOUT is None?

On my machine the traceback suggests the following flow of code.

def open(self, fullurl, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
    # accept a URL or a Request object                                                                                               
    if isinstance(fullurl, basestring):
        req = Request(fullurl, data)
    else:
        req = fullurl
        if data is not None:
            req.add_data(data)

    req.timeout = timeout
    protocol = req.get_type()

Which is called from:

def urlopen(url, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
    global _opener
    if _opener is None:
        _opener = build_opener()
    return _opener.open(url, data, timeout)

And in rosmake this is called without extra argunents:

fh= urllib2.urlopen(url)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-07-28 10:31:55 -0500

Seen: 3,577 times

Last updated: Jul 28 '11