Printing result from `.max()` errors
See original GitHub issueRan the following Python script using CuPy 7.2.0 and got an error. Note the print
is what causes the error.
import cupy
a = cupy.arange(5)
r = a.max()
print(r)
Exception:
Traceback (most recent call last):
File "test_cupy_repr.py", line 5, in <module>
print(r)
File "cupy/core/core.pyx", line 1366, in cupy.core.core.ndarray.__str__
File "cupy/core/core.pyx", line 1456, in cupy.core.core.ndarray.get
File "cupy/core/core.pyx", line 1462, in cupy.core.core.ndarray.get
File "cupy/cuda/memory.pyx", line 449, in cupy.cuda.memory.MemoryPointer.copy_to_host
File "cupy/cuda/runtime.pyx", line 378, in cupy.cuda.runtime.memcpy
File "cupy/cuda/runtime.pyx", line 201, in cupy.cuda.runtime.check_status
cupy.cuda.runtime.CUDARuntimeError: cudaErrorIllegalAddress: an illegal memory access was encountered
Additional exception (during cleanup):
Traceback (most recent call last):
File "cupy/cuda/driver.pyx", line 247, in cupy.cuda.driver.moduleUnload
File "cupy/cuda/driver.pyx", line 118, in cupy.cuda.driver.check_status
TypeError: 'NoneType' object is not callable
Exception ignored in: 'cupy.cuda.function.Module.__dealloc__'
Traceback (most recent call last):
File "cupy/cuda/driver.pyx", line 247, in cupy.cuda.driver.moduleUnload
File "cupy/cuda/driver.pyx", line 118, in cupy.cuda.driver.check_status
TypeError: 'NoneType' object is not callable
If it is a bug report, please include the following information:
- Conditions (you can just paste the output of
python -c 'import cupy; cupy.show_config()'
)- CuPy version: 7.2.0
- OS/Platform: Ubuntu 16.04.5 LTS (Xenial)
- CUDA version: 10.1.243
- cuDNN/NCCL version (if applicable): 7.6.5/2.5.7.1
- Code to reproduce: (see above)
- Error messages, stack traces, or logs: (see above)
Issue Analytics
- State:
- Created 4 years ago
- Comments:34 (27 by maintainers)
Top Results From Across the Web
python 3.x - Receiving a ValueError during max() operation
The only way to get that error message is by passing an empty sequence to max and min functions, like this >>> max(())...
Read more >Printing the max in a list giving error: int object not callable
So, the problem is with print , max , or sums . You aren't calling anything on sums so we can ignore that....
Read more >Console - Max API
Print an error to the Max window. Max 5 introduced object_error(), which provides several enhancements to error() where a valid t_object pointer is...
Read more >Messages Printed on the Error Logs or Reports
Message Cause Solution
"85: Error" The specified graphics library is unavailable. Check that the data is va...
"86: Error" Parameters of the control code are...
Read more >Built-in Functions — Python 3.11.1 documentation
The result is a valid Python expression. If x is not a Python int ... errors) parameters; bytearray() then converts the string to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It looks like
cdef ndarray y
was dropped in that commit. Could that be it?Confirmed this is fixed on conda-forge (we just pushed conda-forge/cupy-feedstock#39).