This repository was archived by the owner on Sep 5, 2023. It is now read-only.
Module 'google.cloud.language_v1' has no attribute 'ClassificationModelOptions' #391
Labels
api: language
Issues related to the googleapis/python-language API.
samples
Issues that are directly related to samples.
type: docs
Improvement to the documentation for an API.
Context: Error while making the API call to get categories from V2 Model. Script is running fine for old code with default version.
Problem: I have a script that uses the google.cloud.language_v1 module to perform text classification on a set of records every day. It was working fine until I made modifications to use the V2Model content categories.
I changed the
content_categories_version
value to explicitly specify the version for the model. I used the code from language_classify_text.py sample by @wizeng23 in the github repo. However, on running the script I receive the below error:module 'google.cloud.language_v1' has no attribute 'ClassificationModelOptions'
Environment details
google-cloud-language
version: 2.5.1Steps to reproduce
document
andcontent_categories_version
as below.Code example
Stack trace
Please let me know if I'm doing anything incorrectly.
Thanks!
The text was updated successfully, but these errors were encountered: