no, I don't used reload(). To avoid using reload everywhere I use this.
https://pastebin.com/sxhYQNTn
El domingo, 2 de mayo de 2021 a las 23:45:59 UTC+2, justin...@gmail.com 
escribió:

> Shot in the dark.... are you using python's reload() functionality 
> anywhere? Does it seem to break after some type of workflow operation?
>
> On Mon, May 3, 2021 at 9:38 AM Rudi Hammad <rudih...@gmail.com> wrote:
>
>> I got the log error. Here it is:
>>
>> # ======================================================================
>> # ERROR: test_average (domain._unittest.testmath.test_numeric.TestNumeric)
>> # ----------------------------------------------------------------------
>> # # Traceback (most recent call last):
>> #   File "D:\domain\_unittest\testmath\test_numeric.py", line 8, in 
>> test_average
>> #     assert np.allclose(numeric.average(((0,-2), (1, 2))), [0.5, 0.0] , 
>> atol=0.01)
>> #   File "D:\domain\math\numeric.py", line 33, in average
>> #     averageList.append(np.average(_))
>> #   File "C:\Program 
>> Files\Autodesk\Maya2018\Python\lib\site-packages\numpy\lib\function_base.py",
>>  
>> line 514, in average
>> #     avg = a.mean(axis)
>> #   File "C:\Program 
>> Files\Autodesk\Maya2018\Python\lib\site-packages\numpy\core\_methods.py", 
>> line 54, in _mean
>> #     arr = asanyarray(a)
>> TypeError: 'NoneType' object is not callable
>>
>>
>> Remember that this error was fixed on its own just by restarting maya. 
>> Any idea what could be happening?
>>
>> El sábado, 1 de mayo de 2021 a las 10:22:04 UTC+2, Juan Moraga escribió:
>>
>>> I agree on what Marcus said, pip install Numpy is not reliable (from 
>>> what I have experienced in the past anyway), at least for Maya 2018.7 (and 
>>> I can imagine with MayaPy2.7 in general).
>>>
>>> Kind regards!
>>>
>>> On Sat, 1 May 2021, 07:40 Marcus Ottosson, <konstr...@gmail.com> wrote:
>>>
>>>> > I can use it with no problem, it is just a rare issue that happens 
>>>> sometimes.
>>>>
>>>> Ah, ok. The reason I ask is because this sounds like the kind of 
>>>> problems you would get with a version compiled for a different Python. 
>>>> Random, subtle, memory related. I would double-check where you got it 
>>>> from, 
>>>> and make sure it was actually compiled for your version of Maya.
>>>>
>>>>
>>>> On Fri, 30 Apr 2021 at 23:51, Rudi Hammad <rudih...@gmail.com> wrote:
>>>>
>>>>> sure, I will.
>>>>> I had a similar issue once at work. Not with numpy but with a unitest 
>>>>> when comparing matrices using MMatrix.isEquivalent(). In my computer all 
>>>>> the tests passed, so I pushed my code into the servered. But strangly 
>>>>> enough,
>>>>> in my colleague computer the same code didn't passed. So we reduce the 
>>>>> tolerance argument, and then it passed. Almost like my cpu could handle 
>>>>> to 
>>>>> compare the float percision but his couldn't.
>>>>> So maybe it is maya messing thing is up depending on how the cpu is 
>>>>> feeling that day? I don't know....
>>>>>
>>>>> El viernes, 30 de abril de 2021 a las 21:30:19 UTC+2, Alok Gandhi 
>>>>> escribió:
>>>>>
>>>>>> And as this is not reliably reproducible, and a restart seems to fix 
>>>>>> it for a while, I would not rule out any memory issues. Keep an eye on 
>>>>>> the 
>>>>>> memory next time it happens. 
>>>>>>
>>>>>> On Sat, May 1, 2021, 00:04 Marcus Ottosson <konstr...@gmail.com> 
>>>>>> wrote:
>>>>>>
>>>>>>> Did you happen to get NumPy from PyPI, via pip install? There was a 
>>>>>>> thread here about it not long ago, but the bottom line is if you 
>>>>>>> haven’t 
>>>>>>> got a version compiled specifically for your version of Maya, it won’t 
>>>>>>> behave.
>>>>>>>
>>>>>>> On Fri, 30 Apr 2021 at 18:20, Rudi Hammad <rudih...@gmail.com> 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> I'll let you know when the error happens again, since I don't know 
>>>>>>>> how to cause it. I think it is something related to can't do what ever 
>>>>>>>> with 
>>>>>>>> None, or something referencing a built-in numpy method.
>>>>>>>> I know this doesn't help so when  it happens again, I'll post it.
>>>>>>>>
>>>>>>>> El viernes, 30 de abril de 2021 a las 17:34:22 UTC+2, Alok Gandhi 
>>>>>>>> escribió:
>>>>>>>>
>>>>>>>>> And what are the errors? Any logs?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Fri, Apr 30, 2021 at 8:27 PM Rudi Hammad <rudih...@gmail.com> 
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Hello,
>>>>>>>>>>
>>>>>>>>>> has anyone experienced this type of behavior working with numpy? 
>>>>>>>>>> I know my code is correct because I unitest method and all tests 
>>>>>>>>>> pass. But 
>>>>>>>>>> from time to time, complety randomly, when i run the unitest I get 
>>>>>>>>>> 17 
>>>>>>>>>> errors all related to methods that use numpy.
>>>>>>>>>> When this happened the first time, I spent hours thinking what 
>>>>>>>>>> was happening, since I didn't modify anything and no matter how much 
>>>>>>>>>> i 
>>>>>>>>>> looked into it everything looked totally okey.
>>>>>>>>>> Then I used the best debuging tool, which is turn off and on 
>>>>>>>>>> again maya, and it was fixed.
>>>>>>>>>>
>>>>>>>>>> Since then, I don't waste my time anymore when i get this strange 
>>>>>>>>>> errors because i know it is not something wrong in my code. And 
>>>>>>>>>> reinitializing maya fix the issue.
>>>>>>>>>> So I wonder if anyone has a similar experience.
>>>>>>>>>>
>>>>>>>>>> Could it be something related with a presicion that need to be 
>>>>>>>>>> set somewhere when using numpy? I always set a tolerance aroung 
>>>>>>>>>> 0.001, so I 
>>>>>>>>>> am not taking a risk comparing very small values.
>>>>>>>>>>
>>>>>>>>>> cheers
>>>>>>>>>>
>>>>>>>>>> -- 
>>>>>>>>>> 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_m...@googlegroups.com.
>>>>>>>>>> To view this discussion on the web visit 
>>>>>>>>>> https://groups.google.com/d/msgid/python_inside_maya/b7388dc6-daf1-4dd7-b7d3-d3c9a234080bn%40googlegroups.com
>>>>>>>>>>  
>>>>>>>>>> <https://groups.google.com/d/msgid/python_inside_maya/b7388dc6-daf1-4dd7-b7d3-d3c9a234080bn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>>>> .
>>>>>>>>>>
>>>>>>>>> -- 
>>>>>>>> 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_m...@googlegroups.com.
>>>>>>>> To view this discussion on the web visit 
>>>>>>>> https://groups.google.com/d/msgid/python_inside_maya/bd565466-50c4-491f-88d3-2b1379167e68n%40googlegroups.com
>>>>>>>>  
>>>>>>>> <https://groups.google.com/d/msgid/python_inside_maya/bd565466-50c4-491f-88d3-2b1379167e68n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>> .
>>>>>>>>
>>>>>>> -- 
>>>>>>> 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_m...@googlegroups.com.
>>>>>>>
>>>>>> To view this discussion on the web visit 
>>>>>>> https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOD%3D3GGU1w%2BgKU8Rk3Fh%2B2HD%2BwaLKR1Z9H0Vv0rSoRy9hg%40mail.gmail.com
>>>>>>>  
>>>>>>> <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOD%3D3GGU1w%2BgKU8Rk3Fh%2B2HD%2BwaLKR1Z9H0Vv0rSoRy9hg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>>
>>>>>> -- 
>>>>> 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_m...@googlegroups.com.
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/python_inside_maya/ff0d0bb3-4806-4ca6-8e9a-504a2d48d5c8n%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/python_inside_maya/ff0d0bb3-4806-4ca6-8e9a-504a2d48d5c8n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> -- 
>>>> 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_m...@googlegroups.com.
>>>>
>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAJZnWH7CEu9Z5G6fbULDLK5QL8XCVW1N7sBDkdxa5r-w%40mail.gmail.com
>>>>  
>>>> <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAJZnWH7CEu9Z5G6fbULDLK5QL8XCVW1N7sBDkdxa5r-w%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> -- 
>> 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_m...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/python_inside_maya/535d20ed-b2a9-483d-8e99-395216ad71dcn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/python_inside_maya/535d20ed-b2a9-483d-8e99-395216ad71dcn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/a034b965-4f4f-4ee5-9889-8a139e6d8042n%40googlegroups.com.

Reply via email to