eDiasoft / midjourney-api-php

Midjourney API client for PHP
33 stars 9 forks source link

Errors #4

Closed bosmanict closed 9 months ago

bosmanict commented 1 year ago

Hi,

I'm getting this error. Any idea how to solve?

Warning: Attempt to read property "status" on array in /art/vendor/ediasoft/midjourney-api-php/src/HttpAdapter/CurlHttpAdapter.php on line 122

Fatal error: Uncaught eDiasoft\Midjourney\Exceptions\ApiException: Error executing API call (: ): in /art/vendor/ediasoft/midjourney-api-php/src/HttpAdapter/CurlHttpAdapter.php:141 Stack trace: #0

ShuCh3n commented 1 year ago

@bosmanict Thanks for bringing this to my attention. I didn't thoroughly test the Curl version, for now, please install guzzle. I will fix this in the next update.

vaigtech commented 10 months ago

Hi, I'm getting this error. Any idea how to solve?

["message":protected]=> string(174) "Client error: POST https://discord.com/api/interactions resulted in a 400 Bad Request response: {"data": ["This command is outdated, please try again in a few minutes"]}

ShuCh3n commented 10 months ago

Probably the "This command is outdated".

I will update the package soon.

Edit:

What are you trying to achieve? Could you share a piece of your code?

vaigtech commented 10 months ago

Hi, I'm getting this error. Any idea how to solve? $midjourney = new MidjourneyApiClient(DISCORD_CHANNEL_ID, DISCORD_AUTH_TOKEN); //$result = $midjourney->info(); $result = $midjourney->imagine('Elephant and a snake romantically having a diner')->send(); debug($result);die();

Deprecated: Creation of dynamic property eDiasoft\Midjourney\Commands\Imagine::$client is deprecated in /var/www/html/test/midjourney/vendor/ediasoft/midjourney-api-php/src/Commands/BaseCommand.php on line 25

Fatal error: Uncaught eDiasoft\Midjourney\Exceptions\MidjourneyException: Max tries exceeded, increase the max try attempt ($midjourney->imagine(*)->setMaxRetries(30)) or check your discord what went wrong. in /var/www/html/test/midjourney/vendor/ediasoft/midjourney-api-php/src/Commands/Imagine.php:204 Stack trace: #0 /var/www/html/test/midjourney/vendor/ediasoft/midjourney-api-php/src/Commands/Imagine.php(201): eDiasoft\Midjourney\Commands\Imagine->retrieveGeneratedImage() #1 /var/www/html/test/midjourney/vendor/ediasoft/midjourney-api-php/src/Commands/Imagine.php(201): eDiasoft\Midjourney\Commands\Imagine->retrieveGeneratedImage() #2 /var/www/html/test/midjourney/vendor/ediasoft/midjourney-api-php/src/Commands/Imagine.php(201): eDiasoft\Midjourney\Commands\Imagine->retrieveGeneratedImage() #3 /var/www/html/test/midjourney/vendor/ediasoft/midjourney-api-php/src/Commands/Imagine.php(201): eDiasoft\Midjourney\Commands\Imagine->retrieveGeneratedImage() #4 /var/www/html/test/midjourney/vendor/ediasoft/midjourney-api-php/src/Commands/Imagine.php(201): eDiasoft\Midjourney\Commands\Imagine->retrieveGeneratedImage() #5 /var/www/html/test/midjourney/vendor/ediasoft/midjourney-api-php/src/Commands/Imagine.php(201): eDiasoft\Midjourney\Commands\Imagine->retrieveGeneratedImage() #6 /var/www/html/test/midjourney/vendor/ediasoft/midjourney-api-php/src/Commands/Imagine.php(201): eDiasoft\Midjourney\Commands\Imagine->retrieveGeneratedImage() #7 /var/www/html/test/midjourney/vendor/ediasoft/midjourney-api-php/src/Commands/Imagine.php(201): eDiasoft\Midjourney\Commands\Imagine->retrieveGeneratedImage() #8 /var/www/html/test/midjourney/vendor/ediasoft/midjourney-api-php/src/Commands/Imagine.php(201): eDiasoft\Midjourney\Commands\Imagine->retrieveGeneratedImage() #9 /var/www/html/test/midjourney/vendor/ediasoft/midjourney-api-php/src/Commands/Imagine.php(201): eDiasoft\Midjourney\Commands\Imagine->retrieveGeneratedImage() #10 /var/www/html/test/midjourney/vendor/ediasoft/midjourney-api-php/src/Commands/Imagine.php(201): eDiasoft\Midjourney\Commands\Imagine->retrieveGeneratedImage() #11 /var/www/html/test/midjourney/vendor/ediasoft/midjourney-api-php/src/Commands/Imagine.php(174): eDiasoft\Midjourney\Commands\Imagine->retrieveGeneratedImage() #12 /var/www/html/test/midjourney/index.php(32): eDiasoft\Midjourney\Commands\Imagine->send() #13 {main} thrown in /var/www/html/test/midjourney/vendor/ediasoft/midjourney-api-php/src/Commands/Imagine.php on line 204

ShuCh3n commented 10 months ago

I'll come back to you later

vaigtech commented 10 months ago

I'll come back to you later

Thanks

ShuCh3n commented 9 months ago

@vaigtech Can you confirm the latest changes work now?

https://github.com/eDiasoft/midjourney-api-php/releases/tag/1.1.0

vaigtech commented 9 months ago

Thank you very much. Everything is working. Thank you again for your efforts