Discussion:
[BitPim-devel] problem trying write phonebook to PM325
Brent Roettger
2005-11-28 01:53:22 UTC
Permalink
<html><div style='background-color:'><DIV class=RTE>All,</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>I am currently working to implement the writing of the phonebook to the LG PM325 phone.</DIV>
<DIV class=RTE>When I try to write data to the phone, I get&nbsp; an exception that states <STRONG><EM>'pbentry' object has no attribute '_pbentry__field_unknown1'</EM></STRONG>.&nbsp; I am confused because I have declared that field&nbsp;in the p_lgpm325.p file and if I change the name of it in the pbentry packet, the error message changes accordingly.</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>Any ideas on what I am doing wrong?&nbsp; The full exception text is below.</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>Thanks,</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>Brent Roettger</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>An unexpected exception has occurred.<BR>Please see the help for details on what to do.</DIV>
<DIV class=RTE>Traceback (most recent call last):<BR>&nbsp; File "C:\SourceForge Projects\bitpim\gui.py", line 174, in run<BR>&nbsp;&nbsp;&nbsp; res=call()<BR>&nbsp; File "C:\SourceForge Projects\bitpim\gui.py", line 114, in __call__<BR>&nbsp;&nbsp;&nbsp; return apply(self.method, self.args+args, d)<BR>&nbsp; File "C:\SourceForge Projects\bitpim\gui.py", line 1681, in senddata<BR>&nbsp;&nbsp;&nbsp; apply(func, args)<BR>&nbsp; File "C:\SourceForge Projects\bitpim\gui.py", line 1698, in writephonebook<BR>&nbsp;&nbsp;&nbsp; return self.commphone.savephonebook(data)<BR>&nbsp; File "C:\SourceForge Projects\bitpim\com_lgpm325.py", line 372, in savephonebook<BR>&nbsp;&nbsp;&nbsp; res=self.sendpbcommand(req, self.protocolclass.pbupdateentryresponse)<BR>&nbsp; File "C:\SourceForge Projects\bitpim\com_lg.py", line 81, in sendpbcommand<BR>&nbsp;&nbsp;&nbsp; request.writetobuffer(buffer)<BR>&nbsp;
File "C:\SourceForge Projects\bitpim\p_lgpm325.py", line 328, in writetobuffer<BR>&nbsp;&nbsp;&nbsp; self.__field_entry.writetobuffer(buf)<BR>&nbsp; File "C:\SourceForge Projects\bitpim\p_lgpm325.py", line 510, in writetobuffer<BR>&nbsp;&nbsp;&nbsp; self.__field_unknown1.writetobuffer(buf)<BR>AttributeError: 'pbentry' object has no attribute '_pbentry__field_unknown1'</DIV> <DIV class=RTE>Variables by last 8 frames, innermost last</DIV> <DIV class=RTE>Frame run in C:\SourceForge Projects\bitpim\gui.py at line 167<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; e =&nbsp; &lt;exceptions.AttributeError instance at 0x0261A378&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; res =&nbsp; None<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self =&nbsp; &lt;WorkerThread(BitPim helper, started daemon)&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; item =&nbsp; (&lt;gui.Request instance at 0x0261C7D8&gt;, &lt;gui.Callback instance at 0x0261C620&gt;)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call =&nbsp; &lt;gui.Request instance at 0x0261C7D8&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ex =&nbsp; &lt;exceptions.AttributeError instance at
0x0261A378&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; resultcb =&nbsp; &lt;gui.Callback instance at 0x0261C620&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; first =&nbsp; 0</DIV> <DIV class=RTE>Frame __call__ in C:\SourceForge Projects\bitpim\gui.py at line 114<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self =&nbsp; &lt;gui.Request instance at 0x0261C7D8&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; args =&nbsp; ()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; d =&nbsp; Keys []<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kwargs =&nbsp; Keys []<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {}</DIV> <DIV class=RTE>Frame senddata in C:\SourceForge Projects\bitpim\gui.py at line 1681<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; count =&nbsp; 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self =&nbsp; &lt;WorkerThread(BitPim helper, started daemon)&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; args =&nbsp; [{'groups': {0: {'group_id': 0, 'name': 'No Group'}, 1: {'group_id': 1, 'name': <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xx =&nbsp; (&lt;bound method WorkerThread.writephonebook of &lt;WorkerThread(BitPim helper, start<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dict =&nbsp; Keys ['categories', 'groups', 'phonebook', 'speeddials', 'uniqueserial']<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {'groups': {0:
{'group_id': 0, 'name': 'No Group'}, 1: {'group_id': 1, 'name': '<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; func =&nbsp; &lt;bound method WorkerThread.writephonebook of &lt;WorkerThread(BitPim helper, starte<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; todo =&nbsp; [(&lt;bound method WorkerThread.writephonebook of &lt;WorkerThread(BitPim helper, star<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; desc =&nbsp; 'Phonebook'</DIV> <DIV class=RTE>Frame writephonebook in C:\SourceForge Projects\bitpim\gui.py at line 1698<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self =&nbsp; &lt;WorkerThread(BitPim helper, started daemon)&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data =&nbsp; Keys ['categories', 'groups', 'phonebook', 'speeddials', 'uniqueserial']<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {'groups': {0: {'group_id': 0, 'name': 'No Group'}, 1: {'group_id': 1, 'name': '</DIV>
<DIV class=RTE>Frame savephonebook in C:\SourceForge Projects\bitpim\com_lgpm325.py at line 372<BR>&nbsp; existingpbook =&nbsp; Keys [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {0: {'serial1': 14, 'number': 14, 'name': 'Yamadon'}, 1: {'serial1': 15, 'number<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data =&nbsp; Keys ['categories', 'groups', 'phonebook', 'speeddials', 'uniqueserial']<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {'groups': {0: {'group_id': 0, 'name': 'No Group'}, 1: {'group_id': 1,
'name': '<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pbook =&nbsp; Keys ['04dde4333f08980412b8ed2b40f73b927d5b7ef6', '08af430355dcf981fd979022adcd30f36c1bf9ba', '0a4aa8985bbfe3644a713d1a61ec7fb59cc7647c', '117791e5874cc7e6439813d071aa2cdf47f9e93f', '12c2c5c1ba330ba04c350f174e662f4fedc3a7ce', '130ffcbb32f87d0b298bf03c3e4d17f96a454260', '19161edf9278b658988990d443a8a95801b5edfd', '19fc5e490344e03e2435676ab9f3782e8b07bff3', '1fd388d45ef03a359eade708274cdd44795c8fbb', '27f26602c2be54a0907053fedeef1b5f69e26373', '2e148b7adf84b66ec63edf5ef25e291fbafaa26c', '368cfa989dc4d3608ed5f81660a4cce4f9997733', '38d5557d1503a47b66ed29ceb7eb722ab557b277', '42c251b3e3e1c2af9a508e081464d172082dcff4', '43aa1b1fa0c1b2ed62d8e1a1510b0f7d4a286db6', '459d102e39e30a9b5fbcdb70997a92bf7dfd8190', '4bca70ff08af0584c9d586bc47725c1039bba55d', '4cb7b99bd6fdbcf0a4aa37e8bcdda871702dac39',
'4d9ff892ce3a502ec77b174ed2b8d5e58180c779', '4e606b3535f21f5198f8f908894a0a9406952474', '5578f68fd6244b23cab0f64828d45ec7c5e7b1a8', '575492724171afcb2e58036473ec24a9d97d1b2c', '5d133fbd1b1b2b72504c2cb171fa55e8ec8af31e', '5d37e878757d170841ac4c74aa600b14f7166b06', '6cfd9bf0de9d92e43ff7c7334c5ec680ab85b36f', '6d3cd422aa868c592c05b3493c7f7a3c96f48e7e', '731b3a6c10bfd32fa0526426618a22da425cbf15', '73a14027d4a8bc5cb7f99435d815c2b4f43221a9', '75a64e00ee6ad3ca0ae5c839435c28cc76babdba', '761ec3d7a23c0b9bc1402e587ed9458e09b049e4', '787a2e6bcb3aa4ad345a478de61739b677523e78', '7d5399f2a1b726535be6f00404b94d4e5b49c28a', '831882d85106a873a3d0a657eb450d111b04b121', '8f354dc9ac6bd07575eaa97efc93cc825121ac69', '9183a614692c3c4172ba166cad962e2dc2edbe9d', '95d012bf5d16110e5573ef6ddf4a258b976ac8ef', '95eae24c54598fa34065b69e52c7e8f8fb69b261', '97a9f0f411056cfc3eeb549a6c5fb3336021f61d',
'9b3e2409bd14d771834955f9cac48e8c6334b80d', 'a26e4591d81a384c74d657202d5d46cb93e7d336', 'a30f8da089308c04087511509ae5836df8bf1598', 'a5e3b1643101db4d94fa887831412f719bb1e58f', 'a93a120cac393722214b9b2a35df95caad07aa55', 'ad19ca4e716195551b7832041f827b626164eeda', 'ae87522180c2e5d7aa9172d85333acc386d0c367', 'afad2a8516c9efcd224eefde070e14c9c255608a', 'b7b3f278c8418d5d791220feea657ada1b508301', 'bac10f4256dc6805bb1c0701d390a53038940945', 'c02004c375d3a603fb570d2ae95c64f5b11b2057', 'cad829e86782a393f6d26b5143c5b123d62e2bae', 'ce2638e764772475466e46bb3d90059a0dc83dba', 'd3ccb826789671b98c214963a21f8ccb072456a0', 'd9deb591de9a201f0ce2e0657d161fb9b5667a08', 'da343e845b2e29a728fdb97d213d21c5bf5816b1', 'dada5ea87bc56f46dfcf09445a1bd0ed2fee1c1e', 'df6976cabf643b840590102e31357c48c2cf5f06', 'ea91c4557226cac979f288c63e04667e74a5e85c', 'eb11214b9cedb26b3f0b5b8edc4f4492d38710f4',
'ed1b9e3efdfcc2a09bb7afd3aa3bb319e62b3fea', 'f85df58ceb304409a3676689356207eb32c2759a', 'f8af54079768ddaa3298602b3039aee506c264d2', 'f9629b604fb8767f3633ee1c2866499cf60ae3eb', 'fc97b2831d5787533ec48d0d420943e7095e3d28']<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {'a30f8da089308c04087511509ae5836df8bf1598': {'serial1': 38, 'group': 0, 'name':<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; req =&nbsp; &lt;p_lgpm325.pbupdateentryrequest object at 0x025D0CD0&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; keys =&nbsp; [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 2<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i =&nbsp; 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; res =&nbsp;
&lt;p_lg.pbnextentryresponse object at 0x020699B0&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self =&nbsp; &lt;com_lgpm325.Phone instance at 0x025B8670&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; counter =&nbsp; 1<BR>&nbsp;&nbsp;&nbsp; progressmax =&nbsp; 188<BR>numexistingentries =&nbsp; 62<BR>&nbsp; serialupdates =&nbsp; []<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ii =&nbsp; Keys ['bitpimserial', 'emails', 'group', 'memo', 'name', 'numbers', 'numbertypes', 'secret', 'serial1', 'url']<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {'serial1': 14, 'group': 0, 'name': 'Yamadon', 'url': '', 'memo': '', 'emails': <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; item =&nbsp;
'12c2c5c1ba330ba04c350f174e662f4fedc3a7ce'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hardway =&nbsp; False<BR>existingserials =&nbsp; [14]<BR>&nbsp;&nbsp;&nbsp; progresscur =&nbsp; 63<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; entry =&nbsp; &lt;p_lgpm325.pbentry object at 0x025D0DF0&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; serial =&nbsp; 4<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dellist =&nbsp; []<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; loop =&nbsp; xrange(62)</DIV> <DIV class=RTE>Frame sendpbcommand in C:\SourceForge Projects\bitpim\com_lg.py at line 81<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buffer =&nbsp; &lt;prototypes.buffer instance at 0x0261A490&gt;<BR>&nbsp;&nbsp;&nbsp; callsetmode =&nbsp; True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; request =&nbsp; &lt;p_lgpm325.pbupdateentryrequest object at 0x025D0CD0&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self =&nbsp; &lt;com_lgpm325.Phone instance at 0x025B8670&gt;<BR>&nbsp; responseclass =&nbsp; &lt;class 'p_lg.pbupdateentryresponse'&gt;</DIV> <DIV class=RTE>Frame writetobuffer in C:\SourceForge Projects\bitpim\p_lgpm325.py at line 328<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self =&nbsp; &lt;p_lgpm325.pbupdateentryrequest object at 0x025D0CD0&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buf =&nbsp; &lt;prototypes.buffer instance at 0x0261A490&gt;</DIV> <DIV class=RTE>Frame writetobuffer in C:\SourceForge Projects\bitpim\p_lgpm325.py at line 510<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self =&nbsp; &lt;p_lgpm325.pbentry object at 0x025D0DF0&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buf =&nbsp; &lt;prototypes.buffer instance at 0x0261A490&gt;<BR></DIV></div></html>
Stephen Wood
2005-11-28 03:53:53 UTC
Permalink
Brent:

When you write a packet, all the fields have to be to something, otherwise
you get this error. You can set the fields in your code. This is
presumably what you do for fields like pbentry.ringtone, etc. The other way
to set a field is to put "+" in front of the field name in the packet
definition. (eg "2 UNKNOWN +unknown1") This will fill in that field with
the default. The default is usually zero unless you specify otherwise
inside the braces.

Look at other .p files for examples and look at
dev-doc/packetdescription.txt if you havn't already.

Stephen
Post by Brent Roettger
All,
I am currently working to implement the writing of the phonebook to the LG
PM325 phone.
When I try to write data to the phone, I get an exception that states *'pbentry'
object has no attribute '_pbentry__field_unknown1'*. I am confused
because I have declared that field in the p_lgpm325.p file and if I change
the name of it in the pbentry packet, the error message changes accordingly.
Any ideas on what I am doing wrong? The full exception text is below.
Brent Roettger
2005-11-28 04:11:36 UTC
Permalink
<html><div style='background-color:'><DIV class=RTE> <P>Stephen,</P> <P>Thanks for the tips!&nbsp; I am off and running with scissors again.&nbsp; I have seen the + notation in some of the other files but did not know what it was for.&nbsp; This is part of the whole reason I started on this project.&nbsp; I wanted to learn something new and I am definitely accomplishing that goal.</P> <P>Brent<BR><BR></P></DIV> <DIV></DIV> <BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #a0c6e5 2px solid; MARGIN-RIGHT: 0px"><FONT style="FONT-SIZE: 11px; FONT-FAMILY: tahoma,sans-serif"> <HR color=#a0c6e5 SIZE=1> <DIV></DIV>From:&nbsp;&nbsp;<I>Stephen Wood &lt;***@gmail.com&gt;</I><BR>Reply-To:&nbsp;&nbsp;<I>bitpim-***@lists.sourceforge.net</I><BR>To:&nbsp;&nbsp;<I>bitpim-***@lists.sourceforge.net</I><BR>Subject:&nbsp;&nbsp;<I>Re: [BitPim-devel] problem trying write phonebook to PM325</I><BR>Date:&nbsp;&nbsp;<I>Sun, 27 Nov 2005 22:53:53 -0500</I><BR>MIME-Version:&nbsp;&nbsp;<I>1.0</I><BR>Received:&nbsp;&nbsp;<I>from lists-outbound.sourceforge.net ([66.35.250.225]) by mc1-f32.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Sun, 27 Nov 2005 19:54:17 -0800</I><BR>Received:&nbsp;&nbsp;<I>from sc8-sf-list2-b.sourceforge.net (sc8-sf-list2-b.sourceforge.net [10.3.1.8])by sc8-sf-spam2.sourceforge.net (Postfix) with ESMTPid 94684F8C4; Sun, 27 Nov 2005 19:54:06 -0800 (PST)</I><BR>Received:&nbsp;&nbsp;<I>from sc8-sf-mx2-b.sourceforge.net ([10.3.1.92] helo=mail.sourceforge.net)by
sc8-sf-list2.sourceforge.net with esmtp (Exim 4.30)id 1Ega5T-00007L-1Efor bitpim-***@lists.sourceforge.net; Sun, 27 Nov 2005 19:53:55 -0800</I><BR>Received:&nbsp;&nbsp;<I>from xproxy.gmail.com ([66.249.82.207])by mail.sourceforge.net with esmtp (Exim 4.44)id 1Ega5S-00052j-Rffor bitpim-***@lists.sourceforge.net; Sun, 27 Nov 2005 19:53:55 -0800</I><BR>Received:&nbsp;&nbsp;<I>by xproxy.gmail.com with SMTP id h29so1976940wxd for &lt;bitpim-***@lists.sourceforge.net&gt;; Sun, 27 Nov 2005 19:53:53 -0800 (PST)</I><BR>Received:&nbsp;&nbsp;<I>by 10.70.78.12 with SMTP id a12mr8724906wxb; Sun, 27 Nov 2005 19:53:53 -0800 (PST)</I><BR>Received:&nbsp;&nbsp;<I>by 10.70.115.12 with HTTP; Sun, 27 Nov 2005 19:53:53 -0800 (PST)</I><BR> <DIV></DIV><BR>Brent:<BR><BR>When you write a packet, all the fields have to be to something, otherwise you get this error.&nbsp; You can set the fields in your code.&nbsp; This is presumably what you do for fields like pbentry.ringtone, etc.&nbsp; The other way to set a field is to put "+" in front of the field name in the packet definition.&nbsp; (eg "2 UNKNOWN +unknown1")&nbsp; This will fill in that field with the default.&nbsp; The default is usually zero unless you specify otherwise inside the braces. <DIV></DIV><BR><BR>Look at other .p files for examples and look at dev-doc/packetdescription.txt if you havn't already.<BR><BR>Stephen<BR><BR> <DIV><SPAN class=gmail_quote>On 11/27/05, <B class=gmail_sendername>Brent Roettger</B> </DIV>&lt;<A href="mailto:***@msn.com">***@msn.com</A>&gt; wrote:</SPAN>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex">
<DIV>
<DIV></DIV>All,</DIV>
<DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV></DIV>
<DIV>I am currently working to implement the writing of the phonebook to the LG PM325 phone.</DIV>
<DIV></DIV>
<DIV>When I try to write data to the phone, I get&nbsp; an exception that states <STRONG><EM>'pbentry' object has no attribute '_pbentry__field_unknown1'</EM></STRONG>.&nbsp; I am confused because I have declared that field&nbsp;in the p_lgpm325.p file and if I change the name of it in the pbentry packet, the error message changes accordingly. </DIV>
<DIV></DIV>
<DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV></DIV>
<DIV>Any ideas on what I am doing wrong?&nbsp; The full exception text is below.</DIV>
<DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV></DIV></BLOCKQUOTE>
<DIV></DIV><BR>
<DIV></DIV>
<DIV></DIV><BR></FONT></BLOCKQUOTE></div></html>
Roger Binns
2005-11-28 04:15:12 UTC
Permalink
Post by Brent Roettger
I have seen the + notation in some of the other files but did not know
what it was for. 
After you have read the packetdescription.txt file please let us know
of anything that it
omits or could be improved by.

Roger

Loading...