I believe the problems lie in the socket module and the _ssl.pyd and _ssl.lib files, which aren't in the Maya Python directories. They are standard python modules, and are definitely in my standard Python installation, just not in Maya's Python (why, I don't know...)
As for installing them from source using mayapy...I'm really not sure how to do that ;) But I appreciate the advice anyways! I think for now I'm going to move on to trying something else, as I'm getting in a little over my head at this point. Also, I feel like these issues would seriously hamper the ability to distribute them to others - which is one of my main goals with the scripts I write while I'm a student (so I can get feedback!). If I were in a studio environment and there was a business case for making this work by modifying installation directory files, I'd be all for it. In this case though, I don't think writing scripts that require this kind of configuration will be terribly popular. Again, thank you for the help, I really do appreciate it. It's time for me to try something else for now. On Jun 14, 11:42 am, Nicolas DUMAY <[email protected]> wrote: > This not a full tutorial on to get it work... (Sorry i'm on my mobile) > but as you guess you need python ssl module within your maya python > interpreter... Go ahead google find a ssl module and install it from > source using mayapy... One strange thing here, i was thinking that ssl > was a standard python module... > However you can't just copy them from your normal python install as > it might be a 32bits version... > > 2009/6/14, JP <[email protected]>: > > > > > > > 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! > > -- > Envoyé avec mon mobile --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/python_inside_maya -~----------~----~----~----~------~----~------~--~---
