version.model returns NoneType, failing all model inference calls in production
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- computer-vision, machine-learning
Research direction
Start by reproducing the failure with the project.version(5).model example in the issue, then inspect pull request #276 for the potential root cause. The work is done when version.model returns the appropriate model object instead of NoneType and the documented model.predict() call succeeds on the example project.
Written by the indexing model from the issue text.
Description
Problem
version.model returns NoneType, failing all model inference calls in production
Reproduce steps
Take any public project that has a model:
https://universe.roboflow.com/batuhan-yilmaz-mnu8w/segmentationexample/model/5
Run python inference code:
!pip install roboflow -U # <---- version 1.1.36
from roboflow import Roboflow
rf = Roboflow(api_key="API_KEY")
project = rf.workspace().project("segmentationexample")
model = project.version(5).model
model.predict() # <--- AttributeError: 'NoneType' object has no attribute 'predict'
type(model) # <--- NoneType
Expected behavior
Current workaround is to downgrade roboflow to version 1.1.33
!pip install roboflow==1.1.33
from roboflow import Roboflow
rf = Roboflow(api_key="API_KEY")
project = rf.workspace().project("segmentationexample")
model = project.version(5).model
type(model) # <--- roboflow.models.semantic_segmentation.SemanticSegmentationModel
Potential root cause:
- Dominant language
- Python
- Stars
- 642
- Forks
- 146
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 13
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from roboflow/roboflow-python
-
`--json` output is not valid JSON for `search --export`, `image upload <dir>`, `model upload` and `version download`Possibly taken @cdeil claimed this 37 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 20/100
roboflow/roboflow-python#546 ·
Maintainers usually reply within 1 day
-
Failed uploads are reported as success: Version.deploy() / Workspace.deploy_model() don't raise, and roboflow model upload / roboflow image upload <dir> exit 0May be free again A pull request for this issue was closed without being merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 55/100
roboflow/roboflow-python#545 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
roboflow/roboflow-python#505 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
roboflow/roboflow-python#433 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
roboflow/roboflow-python#429 ·
Maintainers usually reply within 1 day
All issues in roboflow/roboflow-python
Similar issues
-
area:core-platform effort:S priority:P3 risk:night-safe status:ready type:test
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
randomparity/kdive#3620 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
FinanceFlash/unvibecode#760 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
google-research/google-research#3470 ·
Maintainers usually reply within 21 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
mrvautin/ha-workouts#11 ·