Bug 188206 - TBb774d176 yumexDialogs.py:364:writelines:TypeError: GtkTextBuffer.insert() argument 2 must be string or read-only buffer, not None
Summary: TBb774d176 yumexDialogs.py:364:writelines:TypeError: GtkTextBuffer.insert() a...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: yumex
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Lauridsen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-04-06 23:07 UTC by Chitlesh GOORAH
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: 1.2.0-1.0.fc6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-12-13 15:09:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Chitlesh GOORAH 2006-04-06 23:07:25 UTC
Description of problem:
Right click on repo livna
Exception Occurred

Version-Release number of selected component (if applicable):
yumex-0.99.16-1.0.fc5

How reproducible:
Everytime

Steps to Reproduce:
1. right click on repo livna
2. exception occurred
3.
  
Actual results:
Component: yumex
Version: 0.99.16
Summary: TBb774d176 yumexDialogs.py:364:writelines:TypeError:
GtkTextBuffer.insert() argument 2 must be string or read-only buffer, not None

Traceback (most recent call last):
  File "/usr/share/yumex/yumexmain.py", line 255, in on_repo_popup
    editrepo = EditRepo( const.GLADE_FILE, activeRepo )
  File "/usr/lib/python2.4/site-packages/yumex/yumexDialogs.py", line 325, in
__init__
    self.update_fields()
  File "/usr/lib/python2.4/site-packages/yumex/yumexDialogs.py", line 357, in
update_fields
    self.writelines( self.URL, urls )
  File "/usr/lib/python2.4/site-packages/yumex/yumexDialogs.py", line 364, in
writelines
    buf.insert( start, lines )
TypeError: GtkTextBuffer.insert() argument 2 must be string or read-only buffer,
not None

Local variables in innermost frame:
start: <GtkTextIter at 0xcf41100>
self: <yumex.yumexDialogs.EditRepo instance at 0xc7c5d8c>
buf: <gtk.TextBuffer object (GtkTextBuffer) at 0xb2a901bc>
lines: None
view: <gtk.TextView object (GtkTextView) at 0xb2bd893c>


Expected results:
A dialog box to edit repo configurations

Additional info:

Second trial ::::
====================

Component: yumex
Version: 0.99.16
Summary: TBb774d176 yumexDialogs.py:364:writelines:TypeError:
GtkTextBuffer.insert() argument 2 must be string or read-only buffer, not None

Traceback (most recent call last):
  File "/usr/share/yumex/yumexmain.py", line 255, in on_repo_popup
    editrepo = EditRepo( const.GLADE_FILE, activeRepo )
  File "/usr/lib/python2.4/site-packages/yumex/yumexDialogs.py", line 325, in
__init__
    self.update_fields()
  File "/usr/lib/python2.4/site-packages/yumex/yumexDialogs.py", line 357, in
update_fields
    self.writelines( self.URL, urls )
  File "/usr/lib/python2.4/site-packages/yumex/yumexDialogs.py", line 364, in
writelines
    buf.insert( start, lines )
TypeError: GtkTextBuffer.insert() argument 2 must be string or read-only buffer,
not None

Local variables in innermost frame:
start: <GtkTextIter at 0xdf9c978>
self: <yumex.yumexDialogs.EditRepo instance at 0xb799c10c>
buf: <gtk.TextBuffer object (GtkTextBuffer) at 0xb0d8d39c>
lines: None
view: <gtk.TextView object (GtkTextView) at 0xb0d5b34c>

Comment 1 Tim Lauridsen 2006-04-07 06:48:36 UTC
Looks like there is no urls definded in you /etc/yum.repos.d/livna.repo file.
How does you licna.repo file like ????

I need to add a check for that, so yumex dont make an exception.

Comment 2 Chitlesh GOORAH 2006-04-07 09:37:42 UTC
True no urls are defined:

my livna.repo
[livna]
name=Livna for Fedora Core $releasever - $basearch - Base
failovermethod=priority
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-livna

[livna-debuginfo]
name=Livna for Fedora Core $releasever - $basearch - Debug
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-livna
gpgcheck=1

[livna-source]
name=Livna for Fedora Core $releasever - $basearch - Source
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-livna
gpgcheck=1

Comment 3 Chitlesh GOORAH 2006-04-07 10:34:26 UTC
It works fine with the following livna.repo:
Nevertheless, it would be nice that it doesn't crash, even if there's no URLS :)


[livna]
name=Livna for Fedora Core $releasever - $basearch - Base
baseurl=
	http://rpm.livna.org/fedora/$releasever/$basearch/
	http://livna.cat.pdx.edu/fedora/$releasever/$basearch/
	http://wftp.tu-chemnitz.de/pub/linux/livna/fedora/$releasever/$basearch/
	http://ftp-stud.fht-esslingen.de/pub/Mirrors/rpm.livna.org/fedora/$releasever/$basearch/
failovermethod=priority
#mirrorlist=http://rpm.livna.org/mirrorlist-5
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-livna

[livna-debuginfo]
name=Livna for Fedora Core $releasever - $basearch - Debug
baseurl=
	http://rpm.livna.org/fedora/$releasever/$basearch/debug/
	http://livna.cat.pdx.edu/fedora/$releasever/$basearch/debug/
	http://wftp.tu-chemnitz.de/pub/linux/livna/fedora/$releasever/$basearch/debug/
	http://ftp-stud.fht-esslingen.de/pub/Mirrors/rpm.livna.org/fedora/$releasever/$basearch/debug/
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-livna
gpgcheck=1

[livna-source]
name=Livna for Fedora Core $releasever - $basearch - Source
baseurl=
	http://rpm.livna.org/fedora/$releasever/SRPMS/
	http://livna.cat.pdx.edu/fedora/$releasever/SRPMS/
	http://wftp.tu-chemnitz.de/pub/linux/livna/fedora/$releasever/SRPMS/
	http://ftp-stud.fht-esslingen.de/pub/Mirrors/rpm.livna.org/fedora/$releasever/SRPMS/
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-livna
gpgcheck=1

Comment 4 Tim Lauridsen 2006-04-07 11:54:06 UTC
I will add some check so it dont crash, when there is no urls in a repo. :-)


Comment 5 Chitlesh GOORAH 2006-04-08 01:39:04 UTC
I don't know to whom to say this, so ill post it here:

My livna.repo file changes everytime yum successfully installed a particular
package, in a sense that it no longer has URLS.

Afterwards my livna.repo looks like
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=188206#c2


Comment 6 Tim Lauridsen 2006-04-10 07:34:04 UTC
(In reply to comment #5)
> I don't know to whom to say this, so ill post it here:
> 
> My livna.repo file changes everytime yum successfully installed a particular
> package, in a sense that it no longer has URLS.
> 
Very weird, have you installed the livna rpm containing the livna repo files ??

I have fixed the traceback, it will be released in 0.99.17.



Comment 7 Chitlesh GOORAH 2006-04-10 12:03:26 UTC
Yes, I've installed the rpm from livna.org

Comment 8 Chitlesh GOORAH 2006-12-13 15:09:27 UTC
For some reason, I don't have this bug any more
I'm closing this bug.


Note You need to log in before you can comment on or make changes to this bug.