Answers.Body: <p>They are probably using guzzle7. Civi will work with guzzle7 but ships with 6, so you need to manually go into the civicrm folder (the one that has e.g. a CRM folder, a Civi folder, a vendor folder, a composer.json and composer.lock file, etc) and type <code>composer require guzzlehttp/guzzle:'^7'</code>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-11-04T11:55:53.853Z
Answers.Text: After that change we'd have to do composer update correct?
Answers.UserDisplayName: Kevin Cristiano
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-11-04T14:32:04.183Z
Answers.Text: No it doesn't seem to need that. If you feel adventurous you can do composer update, or add -W to the require command, but then you might get some versions of packages that haven't been well-tested with civi (although it would probably be similar to the versions that get installed with drupal 8).
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-11-04T18:18:46.113Z
Answers.Text: Running this command has corrected the error with the ScormCloud plugin which is the priority. I will test the other plugin over the weekend. Thanks for the info!!
Answers.UserDisplayName: KilakwaBT
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-11-03T19:46:51.217Z
Answers.LastActivityDate: 2022-11-03T19:46:51.217Z
Answers.UserDisplayName: Demerit
Body: <p>I am getting GuzzleHttp errors when activating or trying to access a couple plugins in conjunction wit CiviCRM. This seems to be with newer versions of CiviCRM (5.52 &amp; higher). I thought initially it was related to the ScormCloud plugin but then it came up with the google analytics plugin. Below are the errors.</p>
  <pre><code>Fatal error: Uncaught Error: Call to undefined method GuzzleHttp\Utils::chooseHandler() in /home/&lt;&lt;account&gt;&gt;/public_html/wp-content/plugins/scormcloud/vendor/guzzlehttp/guzzle/src/functions.php:61 
  Stack trace: 
  #0 /home/&lt;&lt;account&gt;&gt;/public_html/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/HandlerStack.php(42): GuzzleHttp\choose_handler() 
  #1 /home/&lt;&lt;account&gt;&gt;/public_html/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/Client.php(65): GuzzleHttp\HandlerStack::create() 
  #2 /home/&lt;&lt;account&gt;&gt;/public_html/wp-content/plugins/scormcloud/vendor/rustici-software/scormcloud-api-v2-client-php/src/Api/CourseApi.php(77): GuzzleHttp\Client-&gt;__construct() 
  #3 /home/&lt;&lt;account&gt;&gt;/public_html/wp-content/plugins/scormcloud/SCORMCloud_PHPLibrary/ScormEngineService2.php(63): RusticiSoftware\Cloud\V2\Api\CourseApi-&gt;__construct(NULL, Object(RusticiSoftware\Cloud\V2\Configuration), NULL) 
  #4 /home/&lt;&lt;account&gt;&gt;/public_html/wp-content/plugins/scormcloud/scormcloudplugin.php(106): ScormEngineService-&gt;__construct('https://cloud.s...', 'YJC8NJPV9J', 'Rl in /home/&lt;&lt;account&gt;&gt;/public_html/wp-content/plugins/scormcloud/vendor/guzzlehttp/guzzle/src/functions.php on line 61
  
  
  An error of type E_ERROR was caused in line 61 of the file /home/&lt;&lt;account&gt;&gt;/public_html/wp-content/plugins/googleanalytics/lib/analytics-admin/vendor/guzzlehttp/guzzle/src/functions.php. Error message: Uncaught Error: Call to undefined method GuzzleHttp\Utils::chooseHandler() in /home/&lt;&lt;account&gt;&gt;/public_html/wp-content/plugins/googleanalytics/lib/analytics-admin/vendor/guzzlehttp/guzzle/src/functions.php:61
  Stack trace:
  #0 /home/&lt;&lt;account&gt;&gt;/public_html/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/HandlerStack.php(42): GuzzleHttp\choose_handler()
  #1 /home/&lt;&lt;account&gt;&gt;/public_html/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/Client.php(65): GuzzleHttp\HandlerStack::create()
  #2 /home/&lt;&lt;account&gt;&gt;/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(52): GuzzleHttp\Client-&gt;__construct()
  #3 /home/&lt;&lt;account&gt;&gt;/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(252): CRM_Extension_Browser-&gt;getGuzzleClient()
  #4 /home/&lt;&lt;account&gt;&gt;/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(196): CRM_Extension_Browser-&gt;grabRemoteJson()
  #5 /home/&lt;&lt;account&gt;&gt;/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(151): CRM_Extension_Browser-&gt;_discoverRemot
  </code></pre>
  
Tags: <wordpress><plugin>
Title: GuzzleHttp Error with certain plugins in WordPress
ThreadText: # GuzzleHttp Error with certain plugins in WordPress
  
  (Asked by: username_0 on 2022-11-03)
  
  I am getting GuzzleHttp errors when activating or trying to access a couple plugins in conjunction wit CiviCRM. This seems to be with newer versions of CiviCRM (5.52 & higher). I thought initially it was related to the ScormCloud plugin but then it came up with the google analytics plugin. Below are the errors.
  
  ```
  Fatal error: Uncaught Error: Call to undefined method GuzzleHttp\Utils::chooseHandler() in /home/<<account>>/public_html/wp-content/plugins/scormcloud/vendor/guzzlehttp/guzzle/src/functions.php:61 
  Stack trace: 
  #0 /home/<<account>>/public_html/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/HandlerStack.php(42): GuzzleHttp\choose_handler() 
  #1 /home/<<account>>/public_html/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/Client.php(65): GuzzleHttp\HandlerStack::create() 
  #2 /home/<<account>>/public_html/wp-content/plugins/scormcloud/vendor/rustici-software/scormcloud-api-v2-client-php/src/Api/CourseApi.php(77): GuzzleHttp\Client->__construct() 
  #3 /home/<<account>>/public_html/wp-content/plugins/scormcloud/SCORMCloud_PHPLibrary/ScormEngineService2.php(63): RusticiSoftware\Cloud\V2\Api\CourseApi->__construct(NULL, Object(RusticiSoftware\Cloud\V2\Configuration), NULL) 
  #4 /home/<<account>>/public_html/wp-content/plugins/scormcloud/scormcloudplugin.php(106): ScormEngineService->__construct('https://cloud.s...', 'YJC8NJPV9J', 'Rl in /home/<<account>>/public_html/wp-content/plugins/scormcloud/vendor/guzzlehttp/guzzle/src/functions.php on line 61
  
  An error of type E_ERROR was caused in line 61 of the file /home/<<account>>/public_html/wp-content/plugins/googleanalytics/lib/analytics-admin/vendor/guzzlehttp/guzzle/src/functions.php. Error message: Uncaught Error: Call to undefined method GuzzleHttp\Utils::chooseHandler() in /home/<<account>>/public_html/wp-content/plugins/googleanalytics/lib/analytics-admin/vendor/guzzlehttp/guzzle/src/functions.php:61
  Stack trace:
  #0 /home/<<account>>/public_html/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/HandlerStack.php(42): GuzzleHttp\choose_handler()
  #1 /home/<<account>>/public_html/wp-content/plugins/civicrm/civicrm/vendor/guzzlehttp/guzzle/src/Client.php(65): GuzzleHttp\HandlerStack::create()
  #2 /home/<<account>>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(52): GuzzleHttp\Client->__construct()
  #3 /home/<<account>>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(252): CRM_Extension_Browser->getGuzzleClient()
  #4 /home/<<account>>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(196): CRM_Extension_Browser->grabRemoteJson()
  #5 /home/<<account>>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/Browser.php(151): CRM_Extension_Browser->_discoverRemot
  
  ```
  
  **Tags:** wordpress, plugin
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-11-03. Score: 2 | Accepted answer
  
  They are probably using guzzle7. Civi will work with guzzle7 but ships with 6, so you need to manually go into the civicrm folder (the one that has e.g. a CRM folder, a Civi folder, a vendor folder, a composer.json and composer.lock file, etc) and type `composer require guzzlehttp/guzzle:'^7'`.
  
  > **Comments:**
  > **username_2**: After that change we'd have to do composer update correct?  
  > **username_1**: No it doesn't seem to need that. If you feel adventurous you can do composer update, or add -W to the require command, but then you might get some versions of packages that haven't been well-tested with civi (although it would probably be similar to the versions that get installed with drupal 8).  
  > **username_0**: Running this command has corrected the error with the ScormCloud plugin which is the priority. I will test the other plugin over the weekend. Thanks for the info!!  
  
  ---
  
  