Re: Re: strange urllib2 error , Is this a bug ? if so any way to resolve it
I do not think this problem is a straight forward resolv.conf problem . In that scenario I should be getting the error in all services . I have checked other services like wget . It even works in case of python2.3... and thats what makes it so wierd -- A-M-I-T S|S ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Re: strange urllib2 error , Is this a bug ? if so any way to resolve it
Hello On Thu, Jul 23, 2009 at 1:30 PM, Amit Sethi amit.pureene...@gmail.comwrote: I do not think this problem is a straight forward resolv.conf problem . In that scenario I should be getting the error in all services . I have checked other services like wget . It even works in case of python2.3... and thats what makes it so wierd I've the same problem with python2.5 in scratchbox (diablo and fremantle), however it works in the device, so this may be some strange scratchbox issue :( . Best, -- Valério Valério http://www.valeriovalerio.org -- A-M-I-T S|S ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Re: strange urllib2 error , Is this a bug ? if so any way to resolve it
On Thu, Jul 23, 2009 at 8:30 AM, Amit Sethiamit.pureene...@gmail.com wrote: I do not think this problem is a straight forward resolv.conf problem . In that scenario I should be getting the error in all services . I have checked other services like wget . It even works in case of python2.3... and thats what makes it so wierd python2.3 works because it is the native python that comes with scratchbox itself (so it uses whatever configuration your host system has, AFAIK). Please try Daniel's suggestion first. Outside scratchbox: # sudo cp /etc/resolv.conf /scratchbox/etc/resolv.conf and see if it works. Also make sure you are running your examples on Scratchbox X86 target. Running Python applications on Scratchbox ARMEL is not supported. Regards, -- Anderson Lizardo OpenBossa Labs - INdT Manaus - Brazil ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Re: Re: strange urllib2 error , Is this a bug ? if so any way to resolve it
Hello, On Thu, Jul 23, 2009 at 2:02 PM, daniel wilms daniel.wi...@nokia.comwrote: test case works for me with both python versions and both targets. So it is not an issue sorry for the spam and the confusion. not in both targets (just X86!!) but in both SDKs (Fremantle and Diablo). Works now, but I had to edit again '/etc/resolv.conf' inside SB, copying the file as described by Anderson didn't worked. Thanks for the help. P.S - when will get python2.5 as default in the SB ? :) Best regards, -- Valério Valério http://www.valeriovalerio.org Cheers Daniel ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Re: Re: strange urllib2 error , Is this a bug ? if so any way to resolve it
ok the problem is resolved ... I changed the /etc/resolv.conf file on scratchbox Now as far as I understand the file /scratchbox/etc/resolv.conf is the one reffered by python2.3 and wget as in my case it was always same as /etc/resolv.conf the scratchbox file /etc/resolv.conf is linked to the file /scratchbox/users/[username]/targets/FREMANTLE_X86/etc/resolv.conf ... this is the file that we need to change as far as I understand. but question though why should they be reffering to different files(python2.5 and 2.3)?? +1, I also think python2.5 should be made standard -- A-M-I-T S|S ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Re: Re: strange urllib2 error , Is this a bug ? if so any way to resolve it
On Thu, Jul 23, 2009 at 9:13 AM, Valerio Valeriovdv...@gmail.com wrote: Works now, but I had to edit again '/etc/resolv.conf' inside SB, copying the file as described by Anderson didn't worked. Thanks for the help. If you did a manual installation (i.e. not using the SDK installer script) or reseted your target, make sure you did run: SBOX sb-conf in -edFL as instructed in: http://maemo.org/development/sdks/maemo_5_beta_2_sdk_installation/#manualinstall It garantees that /scratchbox/etc/resolv.conf is always used, and /etc/resolv.conf (inside scratchbox) is ignored. Here I tested putting my sbox target's /etc/resolv.conf as: nameserver 1.2.3.4 (that is , with a bogus IP) and name resolution still worked , because my /scratchbox/etc/resolv.conf is correct. P.S - when will get python2.5 as default in the SB ? :) I hope not during freamantle life cycle :) It would conflict with PyMaemo in interesting ways. Regards, -- Anderson Lizardo OpenBossa Labs - INdT Manaus - Brazil ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Re: Re: strange urllib2 error , Is this a bug ? if so any way to resolve it
On Thu, Jul 23, 2009 at 9:19 AM, Amit Sethiamit.pureene...@gmail.com wrote: ok the problem is resolved ... I changed the /etc/resolv.conf file on scratchbox Now as far as I understand the file /scratchbox/etc/resolv.conf is the one reffered by python2.3 and wget as in my case it was always same as /etc/resolv.conf the scratchbox file /etc/resolv.conf is linked to the file /scratchbox/users/[username]/targets/FREMANTLE_X86/etc/resolv.conf ... this is the file that we need to change as far as I understand. but question though why should they be reffering to different files(python2.5 and 2.3)?? See my previous post. Your target is probably mis-configured, /etc/resolv.conf is NEVER used AFAIK. This can be confirmed by running this command inside scratchbox X86 target: strace -e open -f wget -q -O /dev/null www.google.com 21 | grep resolv.conf here it returns: open(/scratchbox/etc/resolv.conf, O_RDONLY) = 4 +1, I also think python2.5 should be made standard Even if sbox moved to python2.5, you would still need to use PyMaemo's python if you plan to make sure your application work on the tablets, because Scrathbox's python is supposed to be used only for internal sbox tools and only sees the modules/extensions from /scratchbox/tools/lib/python2.3 So pybluez/pygtk/etc. would not work. Regards, -- Anderson Lizardo OpenBossa Labs - INdT Manaus - Brazil ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
strange urllib2 error , Is this a bug ? if so any way to resolve it
Hi , I am trying to download an image using urllib2(also tried urllib) , however i get a (-3, 'Temporary failure in name resolution') Now i have tried running wget which runs fine ... interestingly their is no error in python2.3 as well and this error only comes in python2.5 Now I run my fremantle SDK inside virtualBox and their is a django server to which urllib2 connects without any problem whatsoever .. Now I would think that their has to be somekind of name resolution in that case as well??? yet their is no error so where is the problem.. -- A-M-I-T S|S ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: strange urllib2 error , Is this a bug ? if so any way to resolve it
ok , I ran another test and tried to use google's ip and it works fine .By the way ... in the last part of my previous mail i am not using the domain name so it does not matter , just ignore it . I though it would be helpful if I give the whole trace so: [sbox-FREMANTLE_X86: ~] python2.5 Python 2.5.2 (r252:60911, Mar 16 2009, 16:36:21) [GCC 4.2.1] on linux2 Type help, copyright, credits or license for more information. import urllib2 a=urllib2.urlopen(http://209.85.153.104/;) a=urllib2.urlopen(http://www.google.com;) Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python2.5/urllib2.py, line 124, in urlopen return _opener.open(url, data) File /usr/lib/python2.5/urllib2.py, line 381, in open response = self._open(req, data) File /usr/lib/python2.5/urllib2.py, line 399, in _open '_open', req) File /usr/lib/python2.5/urllib2.py, line 360, in _call_chain result = func(*args) File /usr/lib/python2.5/urllib2.py, line 1107, in http_open return self.do_open(httplib.HTTPConnection, req) File /usr/lib/python2.5/urllib2.py, line 1082, in do_open raise URLError(err) urllib2.URLError: urlopen error (-3, 'Temporary failure in name resolution') P.S: Should urllib2 even handle name resolution ??? -- A-M-I-T S|S ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers