LuisC <[EMAIL PROTECTED]> added the comment:

Hi Amaury, thanks for you response...

This is my code sniped

gboolean
gui_file_copy_to_journal(char const *uri)
{
        g_printerr("SAVING PYTHON JOURNAL!...........%s\n", uri);

        char * arg1[7];

        arg1[0] = "python";
        arg1[1] = "/home/olpc/copy-to-Journal.py"; 
        arg1[2] = uri+7;
        arg1[3] = "-d";
        arg1[4] = "hoja_de_calculo"; 
        arg1[5] = "-m";
        arg1[6] = "application/x-gnumeric"; 

        g_printerr ("Writing py \n");
        Py_Initialize(); 
        Py_Main(7, arg1);
        Py_Finalize();
        g_printerr ("Writing Py_Finalize \n");

        return TRUE;
}

also, I tried with other method like linux journal show in 
http://www.linuxjournal.com/article/3641

Any help is greatly appreciated...

Luis Carrión
Tata Consultancy Services
Colonia 1329-Piso 3
Montevideo,.
Uruguay
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com
____________________________________________
Experience certainty.   IT Services
                        Business Solutions
                        Outsourcing
____________________________________________

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> 
27/11/2008 07:22 a.m.
Please respond to
Python tracker <[EMAIL PROTECTED]>

To
[EMAIL PROTECTED]
cc

Subject
[issue4443] Python/pystate.c:561 :PyGILState: The assertion 
'autoInterpreterState' has failed

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

The assertion is clear if you open the source code (Python/pystate.c,
line 561):

assert(autoInterpreterState); /* Py_Initialize() hasn't been called! */

Does your code make sure that the python interpreter is initialized?

----------
nosy: +amaury.forgeotdarc

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4443>
_______________________________________

ForwardSourceID:NT0000A7E6 
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you

Added file: http://bugs.python.org/file12139/unnamed

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4443>
_______________________________________
<br><font size=2 face="sans-serif">Hi Amaury, thanks for you response...</font>
<br>
<br><font size=2 face="sans-serif">This is my code sniped</font>
<br>
<br><font size=2 face="Courier New">gboolean</font>
<br><font size=2 face="Courier New">gui_file_copy_to_journal(char const
*uri)</font>
<br><font size=2 face="Courier New">{</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; 
g_printerr(&quot;SAVING
PYTHON JOURNAL!...........%s\n&quot;, uri);</font>
<br>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; char
* arg1[7];</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; arg1[0]
= &quot;python&quot;;</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; arg1[1]
= &quot;/home/olpc/copy-to-Journal.py&quot;; </font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; arg1[2]
= uri+7;</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; arg1[3]
= &quot;-d&quot;;</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; arg1[4]
= &quot;hoja_de_calculo&quot;; </font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; arg1[5]
= &quot;-m&quot;;</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; arg1[6]
= &quot;application/x-gnumeric&quot;; </font>
<br>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; g_printerr
(&quot;Writing py \n&quot;);</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; 
<b>Py_Initialize();</b>
&nbsp; &nbsp; &nbsp; &nbsp;</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; Py_Main(7,
arg1);</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; 
<b>Py_Finalize();</b></font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; g_printerr
(&quot;Writing Py_Finalize \n&quot;);</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; return
TRUE;</font>
<br><font size=2 face="Courier New">}</font>
<br>
<br><font size=2 face="sans-serif">also, I tried with other method like
linux journal show in http://www.linuxjournal.com/article/3641</font>
<br>
<br><font size=2 face="sans-serif">Any help is greatly appreciated...</font>
<br><font size=2 face="sans-serif"><br>
Luis Carrión<br>
Tata Consultancy Services<br>
Colonia 1329-Piso 3<br>
Montevideo,.<br>
Uruguay<br>
Mailto: [EMAIL PROTECTED]<br>
Website: http://www.tcs.com<br>
____________________________________________<br>
Experience certainty. &nbsp; &nbsp; &nbsp; &nbsp;IT Services<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;Business Solutions<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;Outsourcing<br>
____________________________________________</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Amaury Forgeot d'Arc &lt;[EMAIL 
PROTECTED]&gt;</b>
</font>
<p><font size=1 face="sans-serif">27/11/2008 07:22 a.m.</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
Python tracker &lt;[EMAIL PROTECTED]&gt;</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">[EMAIL PROTECTED]</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">[issue4443] Python/pystate.c:561 :PyGILState:
The assertion 'autoInterpreterState' has failed</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><tt><font size=2><br>
Amaury Forgeot d'Arc &lt;[EMAIL PROTECTED]&gt; added the comment:<br>
<br>
The assertion is clear if you open the source code (Python/pystate.c,<br>
line 561):<br>
<br>
assert(autoInterpreterState); /* Py_Initialize() hasn't been called! */<br>
<br>
Does your code make sure that the python interpreter is initialized?<br>
<br>
----------<br>
nosy: +amaury.forgeotdarc<br>
<br>
_______________________________________<br>
Python tracker &lt;[EMAIL PROTECTED]&gt;<br>
&lt;http://bugs.python.org/issue4443&gt;<br>
_______________________________________<br>
</font></tt>
<br><font size=1 color=white face="sans-serif">ForwardSourceID:NT0000A7E6
&nbsp; &nbsp;</font>
<br><pre>=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


</pre>
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to