Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am running Tutorial application example for Quickly ( I named App Smallbrowser). This is code from SmallbrowserWindow.py :

import gettext
from gettext import gettext as _
gettext.textdomain('smallbrowser')

from gi.repository import Gtk, WebKit # pylint: disable=E0611
import logging
logger = logging.getLogger('smallbrowser')

from smallbrowser_lib import Window
from smallbrowser.AboutSmallbrowserDialog import AboutSmallbrowserDialog
from smallbrowser.PreferencesSmallbrowserDialog import PreferencesSmallbrowserDialog

# See smallbrowser_lib.Window.py for more details about how this class works
class SmallbrowserWindow(Window):
    __gtype_name__ = "SmallbrowserWindow"

    def finish_initializing(self, builder): # pylint: disable=E1002
        """Set up the main window"""
        super(SmallbrowserWindow, self).finish_initializing(builder)

        self.AboutDialog = AboutSmallbrowserDialog
        self.PreferencesDialog = PreferencesSmallbrowserDialog

        # Code for other initialization actions should be added here.

        self.refreshbutton = self.builder.get_object("refreshbutton")
        self.urlentry = self.builder.get_object("urlentry")
        self.scrollwindow = self.builder.get_object("scrollwindow")
        self.webview =  WebKit.WebView()  
        self.scrollwindow.add(self.webview)
        self.webview.show()  

    def on_refreshbutton_clicked(self, widget):
        print "refresh"

    def on_urlentry_activate(self, widget):
        print urlsite     
        urlsite = widget.get_text()

        self.webview.open(urlsite)

So when I run Smallbrowser and write desired Url I got this error on WebKit canvas :

Unable to load page Problem occurred while loading the URL http://www.google.com/ Cannot resolve proxy hostname ()

I don't understand where is my mistake.

share|improve this question
add comment

2 Answers

I don't find any errors in the code you have written so i guess the problem lies in the way you have configured your proxy settings for your computer. Go to Network Settings --> Proxy change the settings to None and try again.

share|improve this answer
    
Well that is main problem. I dont get this error with with Firefox or Chromium? I have fresh installation of Ubuntu from last week and I don't recall setting up any kind of proxy. –  mno2014 Mar 7 '13 at 17:13
    
Problem: It was on Automatic in Network Settings Configuration. So I switched to None. It helped. –  mno2014 Mar 7 '13 at 17:24
add comment

replace this

self.webview.open(urlsite)

with this

self.webview.open("https://" + urlsite)  

And it should work.

share|improve this answer
2  
If I understand Yours advice correctly I should enforce Https protocol? If Web site natively doesn't support Https I think it wuoldn't work for given example. –  mno2014 Mar 7 '13 at 20:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.