ResponseText: Error: Typed property Drupal\tmgmt_openai\Plugin\tmgmt\Translator\OpenAiTranslator::$client must not be accessed before initialization in Drupal\tmgmt_openai\Plugin\tmgmt\Translator\OpenAiTranslator->completionsRequest()

Created on 23 November 2023, about 1 year ago

When I submit some locales, it shows error as below:

An error has occurred.
Please continue to the error page

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /batch?id=39&op=do_nojs&op=do
StatusText: OK
ResponseText: Error: Typed property Drupal\tmgmt_openai\Plugin\tmgmt\Translator\OpenAiTranslator::$client must not be accessed before initialization in Drupal\tmgmt_openai\Plugin\tmgmt\Translator\OpenAiTranslator->completionsRequest() (line 225 of /var/www/mysite/web/modules/contrib/tmgmt_openai/src/Plugin/tmgmt/Translator/OpenAiTranslator.php).

Clicking on "the error page" link, it shows error as below:

Error message
No PSR-18 clients found. Make sure to install a package providing "psr/http-client-implementation". Example: "php-http/guzzle7-adapter".

My Drupal: 9.5.11

๐Ÿ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

๐Ÿ‡จ๐Ÿ‡ณChina fishfree

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024