Proxied net

Bug #175587 reported by Ivan Brasil Fuzzer
4
Affects Status Importance Assigned to Milestone
PyTube
Incomplete
Undecided
Unassigned

Bug Description

I'm behind a proxy and PyTube does not recognize my definitions about proxy in System/Preferences/Proxy

Revision history for this message
swierq (swierq) wrote :

please try to launch pytube in terminal and report if it solves this problem.

Revision history for this message
Ivan Brasil Fuzzer (ivanbrasil) wrote :

I launched the pytube in terminal and tried to search the string "flisol erechim" and getting this output:

ivan@abu:~$ pytube
./pytube.py:483: GtkWarning: gtk_tree_model_get_n_columns: assertion `GTK_IS_TREE_MODEL (tree_model)' failed
  self.wTree = gtk.glade.XML(self.gladefile, "mainwindow")
./pytube.py:483: GtkWarning: gtk_combo_box_set_row_span_column: assertion `row_span >= -1 && row_span < col' failed
  self.wTree = gtk.glade.XML(self.gladefile, "mainwindow")
./pytube.py:483: GtkWarning: gtk_combo_box_set_column_span_column: assertion `column_span >= -1 && column_span < col' failed
  self.wTree = gtk.glade.XML(self.gladefile, "mainwindow")
./pytube.py:483: GtkWarning: gtk_tree_row_reference_new: assertion `GTK_IS_TREE_MODEL (model)' failed
  self.wTree = gtk.glade.XML(self.gladefile, "mainwindow")
./pytube.py:483: GtkWarning: gtk_cell_view_set_displayed_row: assertion `GTK_IS_TREE_MODEL (cell_view->priv->model)' failed
  self.wTree = gtk.glade.XML(self.gladefile, "mainwindow")
Traceback (most recent call last):
  File "./pytube.py", line 541, in RefreshViewPort
    if "youtube.com" in self.wTree.get_widget("combobox3").get_active_text():
TypeError: argument of type 'NoneType' is not iterable
Traceback (most recent call last):
  File "./pytube.py", line 571, in Search
    startsearch.run()
  File "./pytube.py", line 73, in run
    urllib.quote_plus(self.wTree.get_widget("entry1").get_text())).entry
  File "./gdata/service.py", line 519, in Get
    server_response = atom.service.AtomService.Get(self, uri, extra_headers)
  File "./gdata/service.py", line 255, in Get
    # Authentication operations
  File "./gdata/service.py", line 211, in _CreateConnection
    string
  File "/usr/lib/python2.5/httplib.py", line 856, in endheaders
    self._send_output()
  File "/usr/lib/python2.5/httplib.py", line 728, in _send_output
    self.send(msg)
  File "/usr/lib/python2.5/httplib.py", line 695, in send
    self.connect()
  File "/usr/lib/python2.5/httplib.py", line 663, in connect
    socket.SOCK_STREAM):
socket.gaierror: (-2, 'Nome ou servi\xc3\xa7o desconhecido')

Revision history for this message
swierq (swierq) wrote :

I did many tests with pytube and squid today and everything worked just fine for me. I was not able to get errors that you got so I will try to explain how pytube uses proxies and hopefully this will help us to decide if there is a pytube or proxy problem.

Pytube uses Python urlib which uses http_proxy variable that should be set in your environment. When you enable proxy in Preferences->network proxy you in fact add proxy settings to ~/.gconf/system/http_proxy/%gconf.xml and make it accessible for many gnome apps via gconf. That is why pytube works fine when you run it in gnome-terminal (gnome-terminal will fetch those settings) and will not run when you use pytube from menu as http_proxy is not set then.

If you want to have http_proxy set in your environment(not only for "gnome environment") you might consider adding:

export http_proxy="http://user:pass@server:port"

to file:
~/.profile

to make it available for you at every time

or to:
/etc/profile

to make setting system wide.

In order to test if your environment is ok you might use wget to try to fetch some website when http_proxy variable is set. If this works and pytube does not, then there is a bug in pytube that I cannot track at the moment so please report that and I will try to hunt it down. If wget also does not work, than your proxy settings or proxy configuration are not right.

Jojo (kuzniarpawel)
Changed in pytube:
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.