asimlqt / php-google-spreadsheet-client

A PHP library for accessing and manipulating Google Spreadsheets
Other
544 stars 152 forks source link

ResourceNotFoundException thrown #197

Open brack11 opened 5 years ago

brack11 commented 5 years ago

Two days ago my script that used your code stopped working, throwing ResourceNotFoundException on line 76 in /vendor/asimlqt/php-google-spreadsheet-client/src/Google/Spreadsheet/SpreadsheetService.php My script contains lines: use Google\Spreadsheet\DefaultServiceRequest; use Google\Spreadsheet\ServiceRequestFactory;

$serviceRequest = new DefaultServiceRequest(""); ServiceRequestFactory::setInstance($serviceRequest);

$spreadsheetService = new Google\Spreadsheet\SpreadsheetService(); $worksheetFeed = $spreadsheetService->getPublicSpreadsheet("1zKMY66aaev3htO5015cHp8wwxKC3J4roEGbXOKC077M"); Error looks like this: PHP Fatal error: Uncaught Google\Spreadsheet\Exception\ResourceNotFoundException: Internal Error in /home2/swarlorg/public_html/bodybuilders/swarl_cert/vendor/asimlqt/php-google-spreadsheet-client/src/Google/Spreadsheet/SpreadsheetService.php:76 Stack trace:

0 /.../vendor/asimlqt/php-google-spreadsheet-client/src/Google/Spreadsheet/SpreadsheetService.php(98): Google\Spreadsheet\SpreadsheetService->getResourceById('Google\Spreadsh...', 'https://spreads...')

1 /.../certificate.php(14): Google\Spreadsheet\SpreadsheetService->getPublicSpreadsheet('1zKMY66aaev3htO...')

2 {main}

thrown in /.../vendor/asimlqt/php-google-spreadsheet-client/src/Google/Spreadsheet/SpreadsheetService.php on line 76 What could it be? issue in my code? my provider? or google changed API? Spreadsheet is public for view for everyone

PYDeret commented 4 years ago

I've got the same error, do you have any fix to this ?