# BYTETracker Error(AttributeError: module 'numpy' has no attribute 'float')

**URL:** <https://discuss.roboflow.com/t/bytetracker-error-attributeerror-module-numpy-has-no-attribute-float/4851>\
**Category:** 🤝  Community Help\
**Created:** [March 16, 2024, 4:44am UTC](https://discuss.roboflow.com/t/bytetracker-error-attributeerror-module-numpy-has-no-attribute-float/4851 "2024-03-16T04:44:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JASONPAQUIBULAN](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/jasonpaquibulan/32/3008_2.png) [@JASONPAQUIBULAN](https://discuss.roboflow.com/u/JASONPAQUIBULAN)\
**Post date:** [March 16, 2024, 4:44am UTC](https://discuss.roboflow.com/t/bytetracker-error-attributeerror-module-numpy-has-no-attribute-float/4851/1 "2024-03-16T04:44:39Z")

</div>

i’m getting this error why running BYTETracker in Google Collab.

AttributeError: module ‘numpy’ has no attribute ‘float’.  
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.  
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:  
[NumPy 1.20.0 Release Notes — NumPy v2.1.dev0 Manual](https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations)

Help me please… ☹

 ![BYTETRACKER ERROR](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/2X/3/39fef9ce421200eda6993e9cf494ced1d23204e0.jpeg)

---

<div class="post-metadata">

**Author:** ![JASONPAQUIBULAN](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/jasonpaquibulan/32/3008_2.png) [@JASONPAQUIBULAN](https://discuss.roboflow.com/u/JASONPAQUIBULAN)\
**Post date:** [March 17, 2024, 3:32am UTC](https://discuss.roboflow.com/t/bytetracker-error-attributeerror-module-numpy-has-no-attribute-float/4851/2 "2024-03-17T03:32:45Z")

</div>

solve the problem by downgrading the numpy to 1.22.4

> <https://github.com/roboflow/notebooks/issues/156>
>
> \### Search before asking
> 
> \- \[X\] I have searched the Roboflow Notebooks \[issues\](…https://github.com/roboflow-ai/notebooks/issues) and found no similar bug report.
> 
> 
> \### Notebook name
> 
> how-to-track-and-count-vehicles-with-yolov8.ipynb
> 
> \### Bug
> 
> File "/opt/homebrew/anaconda3/envs/roboflow/lib/python3.10/site-packages/numpy/\_\_init\_\_.py", line 313, in \_\_getattr\_\_
> raise AttributeError(\_\_former\_attrs\_\_\[attr\])
> AttributeError: module 'numpy' has no attribute 'float'.
> \`np.float\` was a deprecated alias for the builtin \`float\`. To avoid this error in existing code, use \`float\` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use \`np.float64\` here.
> The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
> https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
> 
> \### Environment
> 
> Python 3.10.12 | packaged by conda-forge 
> Macbook pro
> 
> 
> pip install cython\_bbox
> Collecting cython\_bbox
> Using cached cython\_bbox-0.1.3.tar.gz (41 kB)
> Preparing metadata (setup.py) ... done
> Building wheels for collected packages: cython\_bbox
> Building wheel for cython\_bbox (setup.py) ... done
> Created wheel for cython\_bbox: filename=cython\_bbox-0.1.3-cp310-cp310-macosx\_11\_0\_arm64.whl size=17022 sha256=5655fbb95198577e3d5edef8fe8869aa15854a286bfb09c3c8a4ccd94e7c95ac
> Stored in directory: /Users/thiruviji/Library/Caches/pip/wheels/33/f2/fc/4a4b0f3870075d64eb15a38c9ecb3c3d582677ee5f2f2e8939
> Successfully built cython\_bbox
> Installing collected packages: cython\_bbox
> Successfully installed cython\_bbox-0.1.3
> 
> \>\>\> from yolox.tracker.byte\_tracker import BYTETracker, STrack
> Traceback (most recent call last):
> File "\<stdin\>", line 1, in \<module\>
> File "/Users/thiruviji/Bi3/roboflow/ByteTrack/yolox/tracker/byte\_tracker.py", line 10, in \<module\>
> from yolox.tracker import matching
> File "/Users/thiruviji/Bi3/roboflow/ByteTrack/yolox/tracker/matching.py", line 7, in \<module\>
> from cython\_bbox import bbox\_overlaps as bbox\_ious
> File "src/cython\_bbox.pyx", line 12, in init cython\_bbox
> File "/opt/homebrew/anaconda3/envs/roboflow/lib/python3.10/site-packages/numpy/\_\_init\_\_.py", line 313, in \_\_getattr\_\_
> raise AttributeError(\_\_former\_attrs\_\_\[attr\])
> AttributeError: module 'numpy' has no attribute 'float'.
> \`np.float\` was a deprecated alias for the builtin \`float\`. To avoid this error in existing code, use \`float\` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use \`np.float64\` here.
> The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
> https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
> 
> \### Minimal Reproducible Example
> 
> thiruviji@Thiruvijis-MBP ByteTrack % python
> Python 3.10.12 | packaged by conda-forge | (main, Jun 23 2023, 22:41:52) \[Clang 15.0.7 \] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> \>\>\> import yolox
> \>\>\> print("yolox.\_\_version\_\_:", yolox.\_\_version\_\_)
> yolox.\_\_version\_\_: 0.1.0
> \>\>\> from yolox.tracker.byte\_tracker import BYTETracker, STrack
> Traceback (most recent call last):
> File "\<stdin\>", line 1, in \<module\>
> File "/Users/thiruviji/Bi3/roboflow/ByteTrack/yolox/tracker/byte\_tracker.py", line 10, in \<module\>
> from yolox.tracker import matching
> File "/Users/thiruviji/Bi3/roboflow/ByteTrack/yolox/tracker/matching.py", line 7, in \<module\>
> from cython\_bbox import bbox\_overlaps as bbox\_ious
> File "src/cython\_bbox.pyx", line 12, in init cython\_bbox
> File "/opt/homebrew/anaconda3/envs/roboflow/lib/python3.10/site-packages/numpy/\_\_init\_\_.py", line 313, in \_\_getattr\_\_
> raise AttributeError(\_\_former\_attrs\_\_\[attr\])
> AttributeError: module 'numpy' has no attribute 'float'.
> \`np.float\` was a deprecated alias for the builtin \`float\`. To avoid this error in existing code, use \`float\` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use \`np.float64\` here.
> The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
> https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
> 
> \### Additional
> 
> \_No response\_
> 
> \### Are you willing to submit a PR?
> 
> \- \[\] Yes I'd like to help by submitting a PR!

---

<div class="post-metadata">

**Author:** ![leo](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/leo/32/2228_2.png) [@leo](https://discuss.roboflow.com/u/leo)\
**Post date:** [March 17, 2024, 4:14am UTC](https://discuss.roboflow.com/t/bytetracker-error-attributeerror-module-numpy-has-no-attribute-float/4851/3 "2024-03-17T04:14:23Z")

</div>

Awesome! Thank you for sharing your solution!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/1X/bb6edbfa56d0cf2ee603f061e9e09103502cc8cc.png) [@system](https://discuss.roboflow.com/u/system)\
**Post date:** [March 24, 2024, 4:14am UTC](https://discuss.roboflow.com/t/bytetracker-error-attributeerror-module-numpy-has-no-attribute-float/4851/4 "2024-03-24T04:14:56Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
