Re: [Maya-Python] Issues with treeview and selections

2018-09-12 Thread Justin Israel
On Thu, Sep 13, 2018, 10:23 AM kiteh  wrote:

> Hi all, I am having some issues with QTreeView where I populates the
> information from another model.
>
> While trying to perform the selection within the tree view, it is suppose
> to be returning me the full path of the selection. However for some
> reasons, there is always a 'NoneType' object/ something in which it will
> returns me 2 items - the selection and a None.
>
> For example, if I have the following tree:
> * ObjectA
> ** ObjectB
> *** ObjectC
>
> # And selected ObjectC, the full path should be - |ObjectA|ObjecBA|ObjectC
> but instead I got |None|ObjectA|ObjecBA|ObjectC
>
>
> One way that I have rectified this problem is using `try... except  Attribute or TypeError>` in the selectionChanged connection for the tree
> view and for the displaying of data in the model where it checks if the
> role equates to `QtCore.Qt.DisplayRole`.
>
> About the latter - Correct me if I am wrong, but doesn't
> QtCore.Qt.DisplayRole valid only if there are characters/strings in the
> field? If so, it should not be deriving the empty values, right?
>

That isn't correct. It's just data like anything else. But it is used as
the display value. If your node returns None for its DisplayRole then it
could get converted to a string.


> This is the script - https://pastebin.com/xTavZfhP
> (I apologize in advance that the code may not work on a typical maya scene
> for some portions within are custom stuff used. Also I have listed out the
> error portions, search using #>>>)
>

Looks like your issue is related to this spot:

@property
def name(self):
return self._node.key()

I don't know what type your node is but if key() is returning None, then
that is what you are getting in your model for the display role.
Make sure you are also accounting for your root node. It should be an empty
string for the name? Maybe what you need to do is:

@property
def name(self):
return self._node.key() or ''




>
> Appreciate for any insights!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/4248b8a9-d0b2-4941-9820-cec6db96a5e2%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3bexMGj%3DoWQrZLzOaOPcdVyTHLTNY-RduUxuw0JVsJdg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] Issues with treeview and selections

2018-09-12 Thread kiteh
Hi all, I am having some issues with QTreeView where I populates the 
information from another model.

While trying to perform the selection within the tree view, it is suppose 
to be returning me the full path of the selection. However for some 
reasons, there is always a 'NoneType' object/ something in which it will 
returns me 2 items - the selection and a None.

For example, if I have the following tree:
* ObjectA
** ObjectB
*** ObjectC

# And selected ObjectC, the full path should be - |ObjectA|ObjecBA|ObjectC 
but instead I got |None|ObjectA|ObjecBA|ObjectC


One way that I have rectified this problem is using `try... except ` in the selectionChanged connection for the tree 
view and for the displaying of data in the model where it checks if the 
role equates to `QtCore.Qt.DisplayRole`.

About the latter - Correct me if I am wrong, but doesn't 
QtCore.Qt.DisplayRole valid only if there are characters/strings in the 
field? If so, it should not be deriving the empty values, right?

This is the script - https://pastebin.com/xTavZfhP
(I apologize in advance that the code may not work on a typical maya scene 
for some portions within are custom stuff used. Also I have listed out the 
error portions, search using #>>>)


Appreciate for any insights!

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/4248b8a9-d0b2-4941-9820-cec6db96a5e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] Re: For loop that iterates over two lists

2018-09-12 Thread Chris Meyers
Thank you both for your replies. It will take me some time to actually 
understand this but at least I know where to start now.

On Wednesday, September 12, 2018 at 2:55:38 PM UTC-4, Chris Meyers wrote:
>
> Hello,
>
> My first post here. I hope it's not too basic for you guys. I've been 
> scripting for a while teaching myself, so please forgive my ignorance. I've 
> been poking around for information on this and haven't run into the right 
> post.
>
> I have two sets of objects. One a set of base meshes, 'leafGeo_SET' and 
> one a set of target meshes, 'leafTgt_SET'.
>
> I'd like to write a for loop that will create a blend shape on each object 
> in the 'leafGeo_SET' with the same indexed object in the 'leafTgt_SET'. 
> Each blendshape will have only one target.  Eventually, I intend to also 
> set keys in the timeline on the weights which is why I store the blendshape 
> result in the variable. First things first.
>
> Here's where i am, and getting an error... "Too many values to unpack"
>
> import maya.cmds as cmds
>
> #assign target and geo sets to variable without unicode in string
> cmds.select('leafTgt_SET')
> TGT = cmds.ls(sl=True, o=True)
> cmds.select('leafGeo_SET')
> GEO = cmds.ls(sl=True, o=True)
>
> for g,t in GEO,TGT:
> #create a blendshape deformer with the objects in the list without 
> testing geo and asign the output to variable BS.
> BS = cmds.blendShape(g,t)
>
> I suspect you folks will say I'm going about it in the wrong way!
>
> Chris
>
>
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/68f3e6eb-e027-4523-87f9-2827bed0f7a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] how to install pyodbc for maya 2017

2018-09-12 Thread Justin Israel
Is this a possible pure python mssql options?
https://github.com/denisenkom/pytds

It was just a quick search, so I am not sure.


On Thu, Sep 13, 2018, 2:16 AM Robert White 
wrote:

> I think he's looking for a library to specifically access MS-SQL not MySQL.
> Sadly I couldn't find any pure python implementations. So you'll probably
> just need to compile your own version.
>
> On Wednesday, September 12, 2018 at 6:27:35 AM UTC-5, flop...@gmail.com
> wrote:
>>
>> You could try a pure python implementation called pymysql (
>> https://pypi.org/project/PyMySQL/)
>> It does have some dependencies: crytography, enum, six, and wheel (which
>> should come doe with the pip install.
>>
>> I haven't used it yet (still sorting other parts of the pipeline), but
>> looked into something I could run in Maya and 3DSMax so i didnt have to
>> compile things multiple times.
>>
>> Cheers,
>> Dave
>>
>>
>> On Wed, Sep 12, 2018 at 9:02 PM MW  wrote:
>>
>>> oh my! I had hoped that I can get away without doing any compiling
>>> because I'm a total noob in this topic. maybe anyone on this forum is using
>>> a module in maya to access microsoft sql server (pymssql, pyodbc or
>>> something different). any help would be greatly appreciated!
>>>
>>> Am Mittwoch, 12. September 2018 12:56:33 UTC+2 schrieb Justin Israel:

 I'm not a Windows user but I imagine that you would have to compile it
 against Microsoft Visual Studio 2012 (?) to match the Maya 2017 compiled
 version.

 On Wed, Sep 12, 2018, 10:50 PM  wrote:

> Hi everybody,
>
> I'm a little bit lost and hope for your help here.
>
> I'm running Maya 2017 update 5 and an microsoft sql server.
>
> I want to use pyodbc in maya to read and write data into our database
> but i can't get pyodbc to work in maya. if i use an external python shell
> it works but not in maya. I always get dll missing error. I checked the
> dependencies and copied the missing msvcr90.dll to the python 
> site-packages
> which led to another error:
>
> ImportError: DLL load failed: %1 is not a valid Win32 application
>
> can anyone tell me how to get pyodbc working in maya.
>
> thanks in advance
>
> --
> You received this message because you are subscribed to the Google
> Groups "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/6f79dfcd-9fc9-4065-b549-f86026c6ef9d%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
 --
>>> You received this message because you are subscribed to the Google
>>> Groups "Python Programming for Autodesk Maya" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to python_inside_maya+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/python_inside_maya/5d4bca57-77c8-4df2-be14-2a36afad3760%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/9cd4bd83-62bf-4879-b82c-35a558f15b72%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA32YEKUarEQmBMimCuwB7Uz2a%2Bd5B0JUYPOF70dyDAFrg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] For loop that iterates over two lists

2018-09-12 Thread Justin Israel
Starting from basics, you can loop over one list and use a counter to index
into the same location on the matching target list:

x = ["a1","b1","c1"]
y = ["a2","b2","c2"]

i = 0
for item in x:
print item, y[i]
i += 1

Python provides an automatic way to do this approach:

for i, item in enumerate(x):
print item, y[i]

The zip() function can create pair-wise items from two lists:

for item1, item2 in zip(x, y):
print item1, item2

In python2, that has the downsize of creating potentially large temporary
lists in memory for you to iterate over. So there is a more efficient
generator option for very large lists :

from itertools import izip

for item1, item2 in izip(x, y):
print item1, item2

Note in python 3, the zip() function becomes the efficient generator like
izip() in python 2.

Justin

On Thu, Sep 13, 2018, 7:41 AM Russell Pearsall  wrote:

> You can use zip (as in zipper) to combine the lists as you want.
>
> for g,t in zip(GEO,TGT):
> Some_func(g, t)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/44587126-3879-4b44-90d1-13e15ec60c4b%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1tVf%3DQN4KyxbapTj_QOSHkNJ8S1NhWZ%3Dzc0B29S1Kfcg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] For loop that iterates over two lists

2018-09-12 Thread Russell Pearsall
You can use zip (as in zipper) to combine the lists as you want.

for g,t in zip(GEO,TGT):
Some_func(g, t)

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/44587126-3879-4b44-90d1-13e15ec60c4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] For loop that iterates over two lists

2018-09-12 Thread Chris Meyers
Hello,

My first post here. I hope it's not too basic for you guys. I've been 
scripting for a while teaching myself, so please forgive my ignorance. I've 
been poking around for information on this and haven't run into the right 
post.

I have two sets of objects. One a set of base meshes, 'leafGeo_SET' and one 
a set of target meshes, 'leafTgt_SET'.

I'd like to write a for loop that will create a blend shape on each object 
in the 'leafGeo_SET' with the same indexed object in the 'leafTgt_SET'. 
Each blendshape will have only one target.  Eventually, I intend to also 
set keys in the timeline on the weights which is why I store the blendshape 
result in the variable. First things first.

Here's where i am, and getting an error... "Too many values to unpack"

import maya.cmds as cmds

#assign target and geo sets to variable without unicode in string
cmds.select('leafTgt_SET')
TGT = cmds.ls(sl=True, o=True)
cmds.select('leafGeo_SET')
GEO = cmds.ls(sl=True, o=True)

for g,t in GEO,TGT:
#create a blendshape deformer with the objects in the list without 
testing geo and asign the output to variable BS.
BS = cmds.blendShape(g,t)

I suspect you folks will say I'm going about it in the wrong way!

Chris






-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/07c2c76a-30a2-40ce-ba00-995bc2a2486f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] how to install pyodbc for maya 2017

2018-09-12 Thread Robert White
I think he's looking for a library to specifically access MS-SQL not MySQL.
Sadly I couldn't find any pure python implementations. So you'll probably 
just need to compile your own version.

On Wednesday, September 12, 2018 at 6:27:35 AM UTC-5, flop...@gmail.com 
wrote:
>
> You could try a pure python implementation called pymysql (
> https://pypi.org/project/PyMySQL/)
> It does have some dependencies: crytography, enum, six, and wheel (which 
> should come doe with the pip install.
>
> I haven't used it yet (still sorting other parts of the pipeline), but 
> looked into something I could run in Maya and 3DSMax so i didnt have to 
> compile things multiple times.
>
> Cheers,
> Dave
>
>
> On Wed, Sep 12, 2018 at 9:02 PM MW > 
> wrote:
>
>> oh my! I had hoped that I can get away without doing any compiling 
>> because I'm a total noob in this topic. maybe anyone on this forum is using 
>> a module in maya to access microsoft sql server (pymssql, pyodbc or 
>> something different). any help would be greatly appreciated!
>>
>> Am Mittwoch, 12. September 2018 12:56:33 UTC+2 schrieb Justin Israel:
>>>
>>> I'm not a Windows user but I imagine that you would have to compile it 
>>> against Microsoft Visual Studio 2012 (?) to match the Maya 2017 compiled 
>>> version. 
>>>
>>> On Wed, Sep 12, 2018, 10:50 PM  wrote:
>>>
 Hi everybody,

 I'm a little bit lost and hope for your help here.

 I'm running Maya 2017 update 5 and an microsoft sql server.

 I want to use pyodbc in maya to read and write data into our database 
 but i can't get pyodbc to work in maya. if i use an external python shell 
 it works but not in maya. I always get dll missing error. I checked the 
 dependencies and copied the missing msvcr90.dll to the python 
 site-packages 
 which led to another error:

 ImportError: DLL load failed: %1 is not a valid Win32 application

 can anyone tell me how to get pyodbc working in maya.

 thanks in advance

 -- 
 You received this message because you are subscribed to the Google 
 Groups "Python Programming for Autodesk Maya" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to python_inside_maya+unsubscr...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/python_inside_maya/6f79dfcd-9fc9-4065-b549-f86026c6ef9d%40googlegroups.com
 .
 For more options, visit https://groups.google.com/d/optout.

>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to python_inside_maya+unsubscr...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/python_inside_maya/5d4bca57-77c8-4df2-be14-2a36afad3760%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/9cd4bd83-62bf-4879-b82c-35a558f15b72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] how to install pyodbc for maya 2017

2018-09-12 Thread MW
thanks. I'll take a look.

Am Mittwoch, 12. September 2018 13:27:35 UTC+2 schrieb flop...@gmail.com:
>
> You could try a pure python implementation called pymysql (
> https://pypi.org/project/PyMySQL/)
> It does have some dependencies: crytography, enum, six, and wheel (which 
> should come doe with the pip install.
>
> I haven't used it yet (still sorting other parts of the pipeline), but 
> looked into something I could run in Maya and 3DSMax so i didnt have to 
> compile things multiple times.
>
> Cheers,
> Dave
>
>
> On Wed, Sep 12, 2018 at 9:02 PM MW > 
> wrote:
>
>> oh my! I had hoped that I can get away without doing any compiling 
>> because I'm a total noob in this topic. maybe anyone on this forum is using 
>> a module in maya to access microsoft sql server (pymssql, pyodbc or 
>> something different). any help would be greatly appreciated!
>>
>> Am Mittwoch, 12. September 2018 12:56:33 UTC+2 schrieb Justin Israel:
>>>
>>> I'm not a Windows user but I imagine that you would have to compile it 
>>> against Microsoft Visual Studio 2012 (?) to match the Maya 2017 compiled 
>>> version. 
>>>
>>> On Wed, Sep 12, 2018, 10:50 PM  wrote:
>>>
 Hi everybody,

 I'm a little bit lost and hope for your help here.

 I'm running Maya 2017 update 5 and an microsoft sql server.

 I want to use pyodbc in maya to read and write data into our database 
 but i can't get pyodbc to work in maya. if i use an external python shell 
 it works but not in maya. I always get dll missing error. I checked the 
 dependencies and copied the missing msvcr90.dll to the python 
 site-packages 
 which led to another error:

 ImportError: DLL load failed: %1 is not a valid Win32 application

 can anyone tell me how to get pyodbc working in maya.

 thanks in advance

 -- 
 You received this message because you are subscribed to the Google 
 Groups "Python Programming for Autodesk Maya" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to python_inside_maya+unsubscr...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/python_inside_maya/6f79dfcd-9fc9-4065-b549-f86026c6ef9d%40googlegroups.com
 .
 For more options, visit https://groups.google.com/d/optout.

>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to python_inside_maya+unsubscr...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/python_inside_maya/5d4bca57-77c8-4df2-be14-2a36afad3760%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/b9ac6689-8878-42ab-9e76-c22735392639%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] how to install pyodbc for maya 2017

2018-09-12 Thread David Shaw
You could try a pure python implementation called pymysql (
https://pypi.org/project/PyMySQL/)
It does have some dependencies: crytography, enum, six, and wheel (which
should come doe with the pip install.

I haven't used it yet (still sorting other parts of the pipeline), but
looked into something I could run in Maya and 3DSMax so i didnt have to
compile things multiple times.

Cheers,
Dave


On Wed, Sep 12, 2018 at 9:02 PM MW  wrote:

> oh my! I had hoped that I can get away without doing any compiling because
> I'm a total noob in this topic. maybe anyone on this forum is using a
> module in maya to access microsoft sql server (pymssql, pyodbc or something
> different). any help would be greatly appreciated!
>
> Am Mittwoch, 12. September 2018 12:56:33 UTC+2 schrieb Justin Israel:
>>
>> I'm not a Windows user but I imagine that you would have to compile it
>> against Microsoft Visual Studio 2012 (?) to match the Maya 2017 compiled
>> version.
>>
>> On Wed, Sep 12, 2018, 10:50 PM  wrote:
>>
>>> Hi everybody,
>>>
>>> I'm a little bit lost and hope for your help here.
>>>
>>> I'm running Maya 2017 update 5 and an microsoft sql server.
>>>
>>> I want to use pyodbc in maya to read and write data into our database
>>> but i can't get pyodbc to work in maya. if i use an external python shell
>>> it works but not in maya. I always get dll missing error. I checked the
>>> dependencies and copied the missing msvcr90.dll to the python site-packages
>>> which led to another error:
>>>
>>> ImportError: DLL load failed: %1 is not a valid Win32 application
>>>
>>> can anyone tell me how to get pyodbc working in maya.
>>>
>>> thanks in advance
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Python Programming for Autodesk Maya" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to python_inside_maya+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/python_inside_maya/6f79dfcd-9fc9-4065-b549-f86026c6ef9d%40googlegroups.com
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/5d4bca57-77c8-4df2-be14-2a36afad3760%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAGvmHEdOqD45%2BEvZ4xB5vdHckc_qMoL0c9tVq6eYjqd-ZPzcxA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] how to install pyodbc for maya 2017

2018-09-12 Thread MW
oh my! I had hoped that I can get away without doing any compiling because 
I'm a total noob in this topic. maybe anyone on this forum is using a 
module in maya to access microsoft sql server (pymssql, pyodbc or something 
different). any help would be greatly appreciated!

Am Mittwoch, 12. September 2018 12:56:33 UTC+2 schrieb Justin Israel:
>
> I'm not a Windows user but I imagine that you would have to compile it 
> against Microsoft Visual Studio 2012 (?) to match the Maya 2017 compiled 
> version. 
>
> On Wed, Sep 12, 2018, 10:50 PM > wrote:
>
>> Hi everybody,
>>
>> I'm a little bit lost and hope for your help here.
>>
>> I'm running Maya 2017 update 5 and an microsoft sql server.
>>
>> I want to use pyodbc in maya to read and write data into our database but 
>> i can't get pyodbc to work in maya. if i use an external python shell it 
>> works but not in maya. I always get dll missing error. I checked the 
>> dependencies and copied the missing msvcr90.dll to the python site-packages 
>> which led to another error:
>>
>> ImportError: DLL load failed: %1 is not a valid Win32 application
>>
>> can anyone tell me how to get pyodbc working in maya.
>>
>> thanks in advance
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to python_inside_maya+unsubscr...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/python_inside_maya/6f79dfcd-9fc9-4065-b549-f86026c6ef9d%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/5d4bca57-77c8-4df2-be14-2a36afad3760%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] how to install pyodbc for maya 2017

2018-09-12 Thread Justin Israel
I'm not a Windows user but I imagine that you would have to compile it
against Microsoft Visual Studio 2012 (?) to match the Maya 2017 compiled
version.

On Wed, Sep 12, 2018, 10:50 PM  wrote:

> Hi everybody,
>
> I'm a little bit lost and hope for your help here.
>
> I'm running Maya 2017 update 5 and an microsoft sql server.
>
> I want to use pyodbc in maya to read and write data into our database but
> i can't get pyodbc to work in maya. if i use an external python shell it
> works but not in maya. I always get dll missing error. I checked the
> dependencies and copied the missing msvcr90.dll to the python site-packages
> which led to another error:
>
> ImportError: DLL load failed: %1 is not a valid Win32 application
>
> can anyone tell me how to get pyodbc working in maya.
>
> thanks in advance
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/6f79dfcd-9fc9-4065-b549-f86026c6ef9d%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA14j%3DYgqDKx4tx9YG5kTqHHnRGRHLo51FFaOaQUyz7cBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] how to install pyodbc for maya 2017

2018-09-12 Thread migewa77
Hi everybody,

I'm a little bit lost and hope for your help here.

I'm running Maya 2017 update 5 and an microsoft sql server.

I want to use pyodbc in maya to read and write data into our database but i 
can't get pyodbc to work in maya. if i use an external python shell it works 
but not in maya. I always get dll missing error. I checked the dependencies and 
copied the missing msvcr90.dll to the python site-packages which led to another 
error:

ImportError: DLL load failed: %1 is not a valid Win32 application

can anyone tell me how to get pyodbc working in maya.

thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/6f79dfcd-9fc9-4065-b549-f86026c6ef9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.