Ticket #3744: 2012-07-04.081140-0300ART.html

File 2012-07-04.081140-0300ART.html, 15.5 KB (added by humitos, 12 years ago)

Log from #python channel at irc.gimp.net

Line 
1<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Conversation with #python at Wed 04 Jul 2012 08:11:40 AM ART on humitos@irc.gimp.net (irc)</title></head><body><h3>Conversation with #python at Wed 04 Jul 2012 08:11:40 AM ART on humitos@irc.gimp.net (irc)</h3>
2<font color="#16569E"><font size="2">(08:11:43 AM)</font> <b>humitos:</b></font> hello people<br/>
3<font color="#16569E"><font size="2">(08:12:33 AM)</font> <b>humitos:</b></font> I'm having this problem with Pango.EllipsizeMode.MIDDLE -&gt; http://fpaste.org/MDQr/<br/>
4<font color="#16569E"><font size="2">(08:13:08 AM)</font> <b>humitos:</b></font> I don't know why I get that error when I run my application because I can access to that attribute from my python<br/>
5<font color="#16569E"><font size="2">(08:13:27 AM)</font> <b>humitos:</b></font> &gt;&gt;&gt; from gi.repository import Pango<br/>
6<font color="#16569E"><font size="2">(08:13:27 AM)</font> <b>humitos:</b></font> &gt;&gt;&gt; Pango.EllipsizeMode.MIDDLE<br/>
7<font color="#16569E"><font size="2">(08:13:27 AM)</font> <b>humitos:</b></font> &lt;enum PANGO_ELLIPSIZE_MIDDLE of type PangoEllipsizeMode&gt;<br/>
8<font color="#16569E"><font size="2">(08:13:27 AM)</font> <b>humitos:</b></font> &gt;&gt;&gt;<br/>
9<font color="#16569E"><font size="2">(08:13:45 AM)</font> <b>humitos:</b></font> does anybody has an idea about what is happening?<br/>
10<font size="2">(08:22:06 AM)</font><b> phako|afk is now known as phako</b><br/>
11<font color="#A82F2F"><font size="2">(08:22:56 AM)</font> <b>jhernandez:</b></font> humitos: weird<br/>
12<font color="#16569E"><font size="2">(08:23:30 AM)</font> <b>humitos:</b></font> jhernandez: I've just reported the issue on Sugar's trac http://bugs.sugarlabs.org/ticket/3744<br/>
13<font color="#A82F2F"><font size="2">(08:24:08 AM)</font> <b>jhernandez:</b></font> I had same issues when I was porting accerciser to use the new gobject introspection based bindings<br/>
14<font color="#16569E"><font size="2">(08:24:39 AM)</font> <b>humitos:</b></font> jhernandez: so, you are on the future for me :) , how did you solve it?<br/>
15<font color="#A82F2F"><font size="2">(08:24:55 AM)</font> <b>jhernandez:</b></font> and, most of the cases were from mixing static and dynamic bindings<br/>
16<font color="#A82F2F"><font size="2">(08:25:02 AM)</font> <b>benzea:</b></font> humitos: what does it if you run python inside sugar-jhbuild shell?<br/>
17<font color="#16569E"><font size="2">(08:25:36 AM)</font> <b>humitos:</b></font> benzea: that output is from the Terminal Activity<br/>
18<font color="#A82F2F"><font size="2">(08:25:49 AM)</font> <b>benzea:</b></font> dunno, I have no idea really ...<br/>
19<font color="#A82F2F"><font size="2">(08:26:10 AM)</font> <b>jhernandez:</b></font> humitos: where&apos;s the source code<br/>
20<font color="#A82F2F"><font size="2">(08:26:11 AM)</font> <b>jhernandez:</b></font> ?<br/>
21<font color="#16569E"><font size="2">(08:26:57 AM)</font> <b>humitos:</b></font> jhernandez: let me check<br/>
22<font color="#A82F2F"><font size="2">(08:28:13 AM)</font> <b>jhernandez:</b></font> I&apos;m wondering if is this one git://git.sugarlabs.org/infoslicer/mainline.git<br/>
23<font color="#16569E"><font size="2">(08:29:16 AM)</font> <b>humitos:</b></font> jhernandez: oh, I was looking for the sugar-toolkit-gtk3 code<br/>
24<font color="#16569E"><font size="2">(08:29:38 AM)</font> <b>humitos:</b></font> jhernandez: yes, that is the code that I'm working on but I have a &quot;ported&quot; version on my pc<br/>
25<font color="#16569E"><font size="2">(08:29:57 AM)</font> <b>humitos:</b></font> jhernandez: I didn't pushed the changes yet because I'm working on the port and I didn't finish<br/>
26<font color="#A82F2F"><font size="2">(08:29:58 AM)</font> <b>jhernandez:</b></font> hmm, I see lot of ols imports<br/>
27<font color="#A82F2F"><font size="2">(08:30:14 AM)</font> <b>tomeu:</b></font> humitos: I would recommend working on a branch<br/>
28<font color="#A82F2F"><font size="2">(08:30:35 AM)</font> <b>tomeu:</b></font> that way you can share the code with others and if you lose your hd, the code is still somewhere<br/>
29<font size="2">(08:30:40 AM)</font><b> achadwick [<em>~achadwick@nat-alpha.ceu.ox.ac.uk</em>] entered the room.</b><br/>
30<font color="#16569E"><font size="2">(08:31:19 AM)</font> <b>humitos:</b></font> tomeu: yes, I agree with you... but this is the way that SugarLabs adopted... I should suggest a new one<br/>
31<font color="#A82F2F"><font size="2">(08:36:34 AM)</font> <b>tomeu:</b></font> we used to code in branches back when I was at sugarlabs :)<br/>
32<font size="2">(08:38:34 AM)</font><b> pitti left the room (quit: WeeChat 0.3.8).</b><br/>
33<font color="#A82F2F"><font size="2">(08:47:15 AM)</font> <b>dieterv:</b></font> humitos: when you said &quot;from my python&quot;, is that the same Python executable &amp; environment (PYTHONPATH, GI_TYPELIB_PATH, ...)  that got invoked when you got the backtrace?<br/>
34<font color="#16569E"><font size="2">(08:47:45 AM)</font> <b>humitos:</b></font> dieterv: I suppose that, how can I check it?<br/>
35<font color="#A82F2F"><font size="2">(08:48:33 AM)</font> <b>dieterv:</b></font> humitos: also, are you sure Pango.EllipsizeMode isn&apos;t being shadowed somewhere, ie if you do print(Pango.__file__) right before the line that results in the exception it still gives you &apos;&lt;gi.repository.Pango&gt;&apos; ?<br/>
36<font color="#16569E"><font size="2">(08:48:41 AM)</font> <b>humitos:</b></font> dieterv: and I think: &quot;YES&quot; because I'm using both inside the sugar-jhbuild<br/>
37<font color="#A82F2F"><font size="2">(08:50:22 AM)</font> <b>dieterv:</b></font> humitos: dunno, with my plain-vanilla jhbuild on fedora 16, for example &quot;jhbuild shell gobject-introspection&quot; does not set PATH and the interactive interpreter behaves differently to what I&apos;d expect<br/>
38<font color="#A82F2F"><font size="2">(08:50:35 AM)</font> <b>dieterv:</b></font> mabye sugar-jhbuild is different, dunno...<br/>
39<font color="#16569E"><font size="2">(08:52:04 AM)</font> <b>humitos:</b></font> dieterv: what do you mean with &quot;different&quot;? I mean, I think the same context is set for both (python as command -interpreter; and python that run InfoSlicer)<br/>
40<font color="#A82F2F"><font size="2">(08:56:41 AM)</font> <b>dieterv:</b></font> humitos: for me, in jhbuild shell, PATH is not prepended with jhbuild&apos;s $(prefix)/bin<br/>
41<font color="#A82F2F"><font size="2">(08:57:14 AM)</font> <b>dieterv:</b></font> humitos: so any executable I run that exists in $(prefix)/bin that I run is *not* going to be the jhbuild version, but the system version<br/>
42<font color="#A82F2F"><font size="2">(08:57:30 AM)</font> <b>dieterv:</b></font> humitos: so if your jhbuild&apos;s $(prefix)/bin contains a python executable<br/>
43<font color="#A82F2F"><font size="2">(08:57:55 AM)</font> <b>dieterv:</b></font> humitos: and sugar-jhbuild has the same issue not setting PATH on &quot;jhbuild shell&quot;<br/>
44<font color="#16569E"><font size="2">(08:58:02 AM)</font> <b>humitos:</b></font> dieterv: mmm... I think that I don't have enough knowledge to understand this situation :(<br/>
45<font color="#A82F2F"><font size="2">(08:58:48 AM)</font> <b>dieterv:</b></font> hmm, let&apos;s see<br/>
46<font color="#A82F2F"><font size="2">(08:59:02 AM)</font> <b>dieterv:</b></font> does sugar-jhbuild install the things it builds in /home/humitos/sugar-jhbuild/install/ ?<br/>
47<font color="#A82F2F"><font size="2">(08:59:09 AM)</font> <b>dieterv:</b></font> if yes, do you have a /home/humitos/sugar-jhbuild/install/python ?<br/>
48<font color="#A82F2F"><font size="2">(08:59:18 AM)</font> <b>dieterv:</b></font> if yes, you might hit the problem I&apos;m describing<br/>
49<font color="#A82F2F"><font size="2">(08:59:28 AM)</font> <b>dieterv:</b></font> if no, never mind, it&apos;s something else ;)<br/>
50<font color="#16569E"><font size="2">(09:00:06 AM)</font> <b>humitos:</b></font> yes, jhbuild installs things under /home/humitos/sugar-jhbuild/install/ but I don't have a directory called &quot;python&quot; inside it<br/>
51<font color="#16569E"><font size="2">(09:00:23 AM)</font> <b>humitos:</b></font> so... &quot;never mind&quot; is the answer and that is so easy to do :D<br/>
52<font color="#A82F2F"><font size="2">(09:00:36 AM)</font> <b>tomeu:</b></font> yeah, sugar-jhbuild at least used to set more env vars than plain jhbuild<br/>
53<font color="#A82F2F"><font size="2">(09:00:40 AM)</font> <b>dieterv:</b></font> no directory, a binary or executable script with it&apos;s file name == python<br/>
54<font color="#A82F2F"><font size="2">(09:00:53 AM)</font> <b>dieterv:</b></font> (or python2)<br/>
55<font color="#A82F2F"><font size="2">(09:00:54 AM)</font> <b>tomeu:</b></font> and we used to build python at some point, but since then we have reduced a lot the dependencies we build inside jhbuild<br/>
56<font color="#16569E"><font size="2">(09:01:03 AM)</font> <b>humitos:</b></font> dieterv: well, no, I don't have anything related with &quot;python&quot;<br/>
57<font color="#A82F2F"><font size="2">(09:01:06 AM)</font> <b>dieterv:</b></font> tomeu: maybe a stray file<br/>
58<font color="#16569E"><font size="2">(09:01:10 AM)</font> <b>humitos:</b></font> $ ls /home/humitos/sugar-jhbuild/install<br/>
59<font color="#16569E"><font size="2">(09:01:10 AM)</font> <b>humitos:</b></font> bin  etc  include  _jhbuild  lib  lib64  libexec  share<br/>
60<font color="#A82F2F"><font size="2">(09:01:32 AM)</font> <b>dieterv:</b></font> ls /home/humitos/sugar-jhbuild/install/bin &lt;- notice the &quot;bin&quot; part<br/>
61<font color="#16569E"><font size="2">(09:01:41 AM)</font> <b>humitos:</b></font> $ ls /home/humitos/sugar-jhbuild/install/bin/<br/>
62<font color="#16569E"><font size="2">(09:01:41 AM)</font> <b>humitos:</b></font> copy-from-journal  datastore-service  sugar           sugar-control-panel  sugar-install-bundle  sugar-presence-service  sugar-ui-check<br/>
63<font color="#16569E"><font size="2">(09:01:41 AM)</font> <b>humitos:</b></font> copy-to-journal    dbus-binding-tool  sugar-activity  sugar-emulator       sugar-launch          sugar-session<br/>
64<font color="#A82F2F"><font size="2">(09:02:18 AM)</font> <b>dieterv:</b></font> humitos: nothing python-ish there so it seems you&apos;ve hit the &quot;never mins, it&apos;s something else&quot; case...<br/>
65<font color="#A82F2F"><font size="2">(09:02:28 AM)</font> <b>dieterv:</b></font> s/mins/mind/<br/>
66<font color="#A82F2F"><font size="2">(09:03:04 AM)</font> <b>dieterv:</b></font> humitos: sorry, no further ideas :/<br/>
67<font color="#062585"><font size="2">(09:03:08 AM)</font> <b>***dieterv</b></font> -&gt; back to work<br/>
68<font color="#A82F2F"><font size="2">(09:03:21 AM)</font> <b>tomeu:</b></font> humitos: you aren&apos;t building pygobject inside sugar-jhbuild, right?<br/>
69<font color="#16569E"><font size="2">(09:05:36 AM)</font> <b>humitos:</b></font> tomeu: no, I think that I'm using it from the system package (fedora 17)<br/>
70<font color="#16569E"><font size="2">(09:07:32 AM)</font> <b>humitos:</b></font> tomeu: &gt;&gt;&gt; import gi<br/>
71<font color="#16569E"><font size="2">(09:07:32 AM)</font> <b>humitos:</b></font> &gt;&gt;&gt; gi.__file__<br/>
72<font color="#16569E"><font size="2">(09:07:32 AM)</font> <b>humitos:</b></font> '/usr/lib64/python2.7/site-packages/gi/__init__.pyc'<br/>
73<font color="#16569E"><font size="2">(09:07:32 AM)</font> <b>humitos:</b></font> &gt;&gt;&gt;<br/>
74<font color="#A82F2F"><font size="2">(09:08:47 AM)</font> <b>tomeu:</b></font> cool<br/>
75<font color="#A82F2F"><font size="2">(09:08:59 AM)</font> <b>tomeu:</b></font> humitos: so are you sure you aren&apos;t importing any static bindings?<br/>
76<font color="#A82F2F"><font size="2">(09:09:12 AM)</font> <b>tomeu:</b></font> humitos: python -vv would tell if you are importing pango.so<br/>
77<font color="#16569E"><font size="2">(09:11:16 AM)</font> <b>humitos:</b></font> tomeu: http://fpaste.org/ayLo/<br/>
78<font color="#A82F2F"><font size="2">(09:11:52 AM)</font> <b>tomeu:</b></font> humitos: no, I meant run the activity like that<br/>
79<font color="#A82F2F"><font size="2">(09:12:02 AM)</font> <b>tomeu:</b></font> it&apos;s the activity what may be loading static bindings<br/>
80<font color="#16569E"><font size="2">(09:12:14 AM)</font> <b>humitos:</b></font> tomeu: mmm... let me think how to do that<br/>
81<font color="#A82F2F"><font size="2">(09:12:41 AM)</font> <b>tomeu:</b></font> from the terminal: python -vv sugar-activity org.blah.bleh.infoslicer<br/>
82<font color="#A82F2F"><font size="2">(09:12:43 AM)</font> <b>tomeu:</b></font> (I think)<br/>
83<font color="#16569E"><font size="2">(09:13:14 AM)</font> <b>humitos:</b></font> tomeu: ok, let see<br/>
84<font color="#16569E"><font size="2">(09:17:39 AM)</font> <b>humitos:</b></font> python -vv /home/humitos/sugar-jhbuild/install/bin/sugar-launch org.sugarlabs.InfoSlicer ---&gt; http://fpaste.org/q2iW/<br/>
85<font color="#16569E"><font size="2">(09:17:43 AM)</font> <b>humitos:</b></font> tomeu: ^<br/>
86<font color="#A82F2F"><font size="2">(09:24:01 AM)</font> <b>tomeu:</b></font> humitos: it&apos;s weird that you don&apos;t load /usr/lib64/python2.7/site-packages/gi/_gi.so<br/>
87<font color="#A82F2F"><font size="2">(09:24:05 AM)</font> <b>tomeu:</b></font> apparently<br/>
88<font color="#A82F2F"><font size="2">(09:24:37 AM)</font> <b>jhernandez:</b></font> humitos: your problem seems to be mixing bindings<br/>
89<font color="#A82F2F"><font size="2">(09:26:26 AM)</font> <b>benzea:</b></font> uh, are you importing sugar and sugar3?<br/>
90<font color="#A82F2F"><font size="2">(09:27:05 AM)</font> <b>benzea:</b></font> or do you maybe need to use sugar3-launch or something? (I don&apos;t  remember how it was solved in the end)<br/>
91<font color="#16569E"><font size="2">(09:27:14 AM)</font> <b>humitos:</b></font> benzea: let me check... it could be; because I'm doing the porting and maybe I forgot to change one of the imports<br/>
92<font color="#16569E"><font size="2">(09:28:20 AM)</font> <b>humitos:</b></font> benzea: nope, I don't have any &quot;import sugar&quot; or &quot;from sugar import &quot;...<br/>
93<font color="#A82F2F"><font size="2">(09:28:39 AM)</font> <b>benzea:</b></font> humitos: what about sugar-launch itself?<br/>
94<font color="#A82F2F"><font size="2">(09:29:05 AM)</font> <b>tomeu:</b></font> benzea: but I&apos;m surprised that any of the static bindings are displayed in the python -v output<br/>
95<font color="#A82F2F"><font size="2">(09:29:13 AM)</font> <b>tomeu:</b></font> s/any/none<br/>
96<font color="#A82F2F"><font size="2">(09:29:36 AM)</font> <b>benzea:</b></font> tomeu: but it is definately loading sugar somewhere<br/>
97<font color="#16569E"><font size="2">(09:29:51 AM)</font> <b>humitos:</b></font> benzea: how can I check if sugar-launch is importing &quot;sugar&quot; (2)<br/>
98<font color="#A82F2F"><font size="2">(09:30:27 AM)</font> <b>tomeu:</b></font> I guess strace -e open is a bigger hammer then<br/>
99<font color="#A82F2F"><font size="2">(09:30:43 AM)</font> <b>lazka:</b></font> what about adding: sys.modules[&quot;sugar&quot;] = &quot;die!&quot;<br/>
100<font color="#A82F2F"><font size="2">(09:31:15 AM)</font> <b>benzea:</b></font> well, need to go again<br/>
101<font color="#16569E"><font size="2">(09:31:28 AM)</font> <b>humitos:</b></font> benzea: thanks for your help<br/>
102<font color="#16569E"><font size="2">(09:39:59 AM)</font> <b>humitos:</b></font> does this channel a public log so I can attach it to the ticket that is related with this issue?<br/>
103<font color="#16569E"><font size="2">(09:40:28 AM)</font> <b>humitos:</b></font> have*<br/>
104<font color="#A82F2F"><font size="2">(09:41:17 AM)</font> <b>tomeu:</b></font> don&apos;t think so<br/>
105<font color="#A82F2F"><font size="2">(09:41:31 AM)</font> <b>tomeu:</b></font> but your chat client probably logs?<br/>