-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while creating prediction #4
Comments
Hi, do you get the solution? Can you share with me? Thanks |
I got the same error. Did you find a solution? |
same error |
do you guys get the solution ? I still facing the same error |
This is the code I used. You need to install the dotenv plugin and to put your Replicate API key in a .env file |
Yes this way it works, but the object prediction does return null right after creating it. Even after 20 seconds, the object created by I suppose we could fetch the id from the list like you do then check the status but then my question is: Will the prediction be added to the list even thought it is not fully completed? And will it always take less than 7 seconds to be added to this list? Thank you for the code by the way, was really confused by this null prediction! Edit** Actualyy, if we cannot fetch the id of the first created object directly how can we ensure we have the right prediction, given that 2 users may create a prediction at the same time! |
Hi,
Thanks for the wonderful package! I am trying to create prediction but it always throws an error :
[Replicate] request started from/to: https://api.replicate.com/v1/predictions.
[Replicate] request from/to: https://api.replicate.com/v1/predictions end.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'Null' is not a subtype of type 'Map<String, dynamic>'
#0 new Prediction.fromJson prediction.dart:75
#1 ReplicatePrediction.create. predictions.dart:62
#2 ReplicateHttpClient.post http_client.dart:54
#3 _MyHomePageState.build. main.dart:61
The text was updated successfully, but these errors were encountered: