Hi all!

First off, what a cool group - I just stumbled upon it while looking
for help with a couple issues I'm having.  I'm a student at Gnomon and
just took John Hood's great Intro-to-Python class, and it was a cool
introduction to lots of new information for me.  I'd only written
scripts in MEL previously, which was my first computer 'language' I
started picking up a year ago or so, so apologies if I ask any dumb
questions.

So recently I picked up the Google Data Python Client Libraries, and
started fooling with them in IDLE.  I was very quickly able to
authenticate, list my documents, upload and download, etc (am I the
only one who thought it was super-cool the first time they used
someone else's API?).

I  brought the same code into Maya and made sure to append the library
directories to sys.path, and that's where I encountered an error
related to SSL:

# Error: 'module' object has no attribute 'ssl'
 # Traceback (most recent call last):
 #   File "<maya console>", line 3, in <module>
 #   File "C:\Users\John\Documents\maya\scripts\googleDocSave  r\gdata
\service.py", line 843, in ClientLogin
 #       self.ProgrammaticLogin(captcha_token, captcha_response)
 #   File "C:\Users\John\Documents\maya\scripts\googleDocSave  r\gdata
\service.py", line 780, in ProgrammaticLogin
 #       headers={'Content-Type':'application/x-www-form-urlencoded'})
 #   File "C:\Users\John\Documents\maya\scripts\googleDocSave  r\atom
\http.py", line 152, in request
 #       connection.endheaders()
 #   File "C:\Users\John\Documents\maya\scripts\googleDocSave  r
\httplib.py", line 860, in endheaders
 #       self._send_output()
 #   File "C:\Users\John\Documents\maya\scripts\googleDocSave  r
\httplib.py", line 732, in _send_output
 #       self.send(msg)
 #   File "C:\Users\John\Documents\maya\scripts\googleDocSave  r
\httplib.py", line 699, in send
 #       self.connect()
 #   File "C:\Users\John\Documents\maya\scripts\googleDocSave  r
\httplib.py", line 1135, in connect
 #       ssl = socket.ssl(sock, self.key_file, self.cert_file)
 # AttributeError: 'module' object has no attribute 'ssl' #

I looked around and compared my DLLs folder to Maya's Python DLLs, and
found that _ssl.lib and _ssl.pyd were both missing from the Maya
directories.  I tried copying them in, which didn't seem to solve the
problem.  I also spent about 10 hours trying to make sense of the
gData libraries, but didn't make much headway in that regard.   I have
a feeling the problem relates to this statement within socket.py's
docstring:  "ssl() -- secure socket layer support (only available if
configured)."  Hrm...I supposed it's not configured?  How can I
"configure" it for Maya's Python?

I'm running Maya 64 bit on a 64-bit Vista system with the 64-bit
Python 2.5.4 (which I tried to borrow the DLLs from).  Oddly enough,
as I was writing this on a Macbook I decided to try in Maya on OS
X...and it worked.  Unfortunately I'm not normally using a Mac and
would still really love to figure out what's going on here.  Even if I
can't solve the problem, I'd like to at least educate myself as to
what the heck's going on.

Again, sorry if any of my terminology or my approach to this is off -
and please let me know if that's the case!  I came across a thread
relating to sending email from Maya, and ended up with similar issues
(it works from the Mac but not from my Vista system), but still can't
figure out how to solve the problem or what the problem truly
is...hopefully someone out there understands more than I do!


--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---

Reply via email to