# Inference issue

**URL:** <https://discuss.roboflow.com/t/inference-issue/6634>\
**Category:** 🤝  Community Help\
**Created:** [July 27, 2024, 11:55pm UTC](https://discuss.roboflow.com/t/inference-issue/6634 "2024-07-27T23:55:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marco\_vargas](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/marco_vargas/32/5183_2.png) [@marco\_vargas](https://discuss.roboflow.com/u/marco_vargas)\
**Post date:** [July 27, 2024, 11:55pm UTC](https://discuss.roboflow.com/t/inference-issue/6634/1 "2024-07-27T23:55:36Z")

</div>

Hi all  
I found this error in a previous post of video inference and seems to be fixed. but here trying to understand the crack detection feature for an image i am getting this similar issue:

`from roboflow import Roboflow`  
`import supervision as sv`  
`import cv2`  
`from PIL import Image`  
`rf = Roboflow(api_key="xxxxxxxxxxxxxxxxxxxxx")`  
`project = rf.workspace().project("crack-bphdr")`  
`model = project.version(2).model`  
`# Load an image`  
`image = Image.open("20220720_140859.jpg")`  
`# Run inference on the image`  
`result = model.predict(image, confidence=40, overlap=30).json() `

I am getting the following error

` result = model.predict(image, confidence=40, overlap=30).json() ^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'predict'`

any idea how to deal with this one?

cheers

---

<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:** [August 17, 2024, 11:56pm UTC](https://discuss.roboflow.com/t/inference-issue/6634/2 "2024-08-17T23:56:09Z")

</div>

Closed on August 17, 2024, 11:56pm UTC

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