hypercrypt / octopus-db

Importer for Octopus Energy API Data
5 stars 0 forks source link

Possibly related to the gas tracker not available, Gas caused it to bomb out. #19

Open anothermort opened 1 year ago

anothermort commented 1 year ago

It did seem to get the latest gas data and i dont seem to have any gaps Debug data below worked fine yesterday and have not done any updates.

Thanks for the great software

adam@ubuntu:/var/www/html/octopus-db$ php octo octopus/import fetching Z...'s electricity usage page #1 fetching 2...'s electricity usage page #1 fetching 2...'s electricity usage page #2 fetching 2...'s electricity usage page #3 fetching E...'s gas usage page #1 fetching E...'s gas usage page #2 PHP Fatal error: Uncaught GuzzleHttp\Exception\ServerException: Server error: GET https://api.octopus.energy/v1/gas-meter-points/.../meters/.../consumption/?page=2&page_size=200 resulted in a 500 Internal Server Error response: Internal Server Error in /var/www/html/octopus-db/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113 Stack trace:

0 /var/www/html/octopus-db/vendor/guzzlehttp/guzzle/src/Middleware.php(69): GuzzleHttp\Exception\RequestException::create()

1 /var/www/html/octopus-db/vendor/guzzlehttp/promises/src/Promise.php(204): GuzzleHttp\Middleware::GuzzleHttp{closure}()

2 /var/www/html/octopus-db/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler()

3 /var/www/html/octopus-db/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise{closure}()

4 /var/www/html/octopus-db/vendor/guzzlehttp/promises/src/Promise.php(248): GuzzleHttp\Promise\TaskQueue->run()

5 /var/www/html/octopus-db/vendor/guzzlehttp/promises/src/Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn()

6 /var/www/html/octopus-db/vendor/guzzlehttp/promises/src/Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()

7 /var/www/html/octopus-db/vendor/guzzlehttp/promises/src/Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()

8 /var/www/html/octopus-db/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()

9 /var/www/html/octopus-db/vendor/guzzlehttp/guzzle/src/Client.php(187): GuzzleHttp\Promise\Promise->wait()

10 /var/www/html/octopus-db/vendor/guzzlehttp/guzzle/src/ClientTrait.php(44): GuzzleHttp\Client->request()

11 /var/www/html/octopus-db/classes/OctopusEnergy.php(95): GuzzleHttp\Client->get()

12 /var/www/html/octopus-db/classes/OctopusEnergy.php(162): OctopusEnergy->fetch_json()

13 /var/www/html/octopus-db/scripts/octopus/import.php(200): OctopusEnergy->get_usage()

14 /var/www/html/octopus-db/octo(31): require_once('...')

15 {main}

thrown in /var/www/html/octopus-db/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113

Fatal error: Uncaught GuzzleHttp\Exception\ServerException: Server error: GET https://api.octopus.energy/v1/gas-meter-points/.../meters/.../consumption/?page=2&page_size=200 resulted in a 500 Internal Server Error response: Internal Server Error in /var/www/html/octopus-db/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113 Stack trace:

0 /var/www/html/octopus-db/vendor/guzzlehttp/guzzle/src/Middleware.php(69): GuzzleHttp\Exception\RequestException::create()

1 /var/www/html/octopus-db/vendor/guzzlehttp/promises/src/Promise.php(204): GuzzleHttp\Middleware::GuzzleHttp{closure}()

2 /var/www/html/octopus-db/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler()

3 /var/www/html/octopus-db/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise{closure}()

4 /var/www/html/octopus-db/vendor/guzzlehttp/promises/src/Promise.php(248): GuzzleHttp\Promise\TaskQueue->run()

5 /var/www/html/octopus-db/vendor/guzzlehttp/promises/src/Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn()

6 /var/www/html/octopus-db/vendor/guzzlehttp/promises/src/Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()

7 /var/www/html/octopus-db/vendor/guzzlehttp/promises/src/Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()

8 /var/www/html/octopus-db/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()

9 /var/www/html/octopus-db/vendor/guzzlehttp/guzzle/src/Client.php(187): GuzzleHttp\Promise\Promise->wait()

10 /var/www/html/octopus-db/vendor/guzzlehttp/guzzle/src/ClientTrait.php(44): GuzzleHttp\Client->request()

11 /var/www/html/octopus-db/classes/OctopusEnergy.php(95): GuzzleHttp\Client->get()

12 /var/www/html/octopus-db/classes/OctopusEnergy.php(162): OctopusEnergy->fetch_json()

13 /var/www/html/octopus-db/scripts/octopus/import.php(200): OctopusEnergy->get_usage()

14 /var/www/html/octopus-db/octo(31): require_once('...')

15 {main}

thrown in /var/www/html/octopus-db/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113 adam@ubuntu:/var/www/html/octopus-db$

anothermort commented 1 year ago

Possibly just a server issue Octopus's end ?

hypercrypt commented 1 year ago

500 does look like an Octopus error rather than the client as that should be an error in the 400-499 range.

I have edited your issue to remove your meter numbers.

I'll look into this tomorrow if the issue persists.

anothermort commented 1 year ago

Thanks, missed the meter numbers!