<br><br><div class="gmail_quote">On Tue, Aug 11, 2009 at 10:46 PM, Chris Rebert <span dir="ltr"><<a href="mailto:clp2@rebertia.com">clp2@rebertia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Sun, Aug 9, 2009 at 8:42 PM, John Haggerty<<a href="mailto:bouncyinc@gmail.com">bouncyinc@gmail.com</a>> wrote:<br>
</div><div class="im">> ok so I know this is one of those "weird" requests but here me out.<br>
> So far I have an issue with a package for python called "libgmail" which is<br>
> basically a gmail interface for python to send messages remoetly.<br>
> Works ok except that the 'sendMessage' routine is bad.<br>
<br>
</div>How is it "bad" precisely? Be specific (e.g. error message(s),<br>
description of observed incorrect behavior).<br>
<div class="im"></div></blockquote><div><br></div><div>In regards to bad would be failing to transmit claiming that the submittal is wrong for the transmit string.</div><div><br></div><div>(where username is my gmail username and "password" is my gmail password to the test account, 6666666969 is the mobile number in question '00' is my "carrier id" from the ogss code example which is just an array location from a preformatted part of the string [probably from wikipedia on mobile carrier email addresses to cell phones], I actually got desperate and commented out the first attempt to transmit which I located in the code as just the "instructions" the code fails on re-transmission, I later on looked at the file and located that it was a zero byte file of no content. The program itself looks for a command from the user's cell phone directly from mms sent to the target gmail account prefaced by "Ogss" and anything else is treated as a command but since the command failed on the first transmit I don't think it's the command per se).</div>
<div><br></div><div><div>owner@bouncyinc:~/Desktop/OGSS$ python ogss.py username password 6666666969 00</div><div>Starting ogss</div><div>Logfile at:/home/owner/ogss.log</div><div>Opening log file for reading</div><div>Parsing user input</div>
<div>Connecting to Gmail</div><div>Logging into Gmail</div><div>Opening log file for writing</div><div>Listening for commands</div><div>Processing Command</div><div>ls: unrecognized option `---------------------------------------------'</div>
<div>Try `ls --help' for more information.</div><div>Seding back results</div><div>Traceback (most recent call last):</div><div> File "ogss.py", line 127, in <module></div><div> main(sys.argv)</div>
<div> File "ogss.py", line 110, in main</div><div> account.sendMessage(tosend)</div><div> File "/usr/lib/python2.5/site-packages/libgmail.py", line 615, in sendMessage</div><div> raise GmailSendError, resultInfo[SM_MSG]</div>
<div>libgmail.GmailSendError: Please try again.</div><div><br></div><div>I traced the result to the sendMessage routine and noted that anytime it tries to send anything it fails this also fails with the standard "docs" package for libgmail 0.30 docs from the maintainer's site.</div>
<div><br></div><div>Now the part where it *does* fail is where it has an issue with looking at the trailing info but then it would have logged the info to the file and emailed me back junk (which it didn't)</div><div>
<br></div><div>I assume this could be done on any system just replace 'ls' with 'dir' or the equivalent.</div></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
> This is included in the above attachment<br>
> it's used in a program called "ogss" which is an sms interface to gmail to<br>
> basically read gmail and then have a command done on a remote machine and<br>
> then spat out on the local machine to a log file that's opened and then<br>
> emailed back<br>
> problem is that the sending back routine fails.<br>
<br>
</div>Which routine is that exactly? Please also specify exactly how it is<br>
failing (e.g. error message(s), description of observed incorrect<br>
behavior).<br>
<br>
I apologize if these questions are answered in comments in the<br>
attachments, but to be honest, the fact that you didn't (or couldn't)<br>
put the specific problematic sections of code (and/or error messages)<br>
inline in your message makes it less likely that people (such as<br>
myself) will try to help you due to the volume of code you're making<br>
people wade through (i.e. people tend not to read large code dumps,<br>
/especially/ in attachments).<br>
<br>
Cheers,<br>
Chris<br>
<font color="#888888">--<br>
<a href="http://blog.rebertia.com" target="_blank">http://blog.rebertia.com</a><br>
</font></blockquote></div>That's ok I understand I hope that helps at least in part.