Your error comes from this method:
/**
* @param \Magento\Catalog\Setup\CategorySetup $categorySetup
* @return void
*/
private function changePriceAttributeDefaultScope($categorySetup)
{
$entityTypeId = $categorySetup->getEntityTypeId(\Magento\Catalog\Model\Product::ENTITY);
foreach (['price', 'cost', 'special_price'] as $attributeCode) {
$attribute = $categorySetup->getAttribute($entityTypeId, $attributeCode);
$categorySetup->updateAttribute(
$entityTypeId,
/*375*/ $attribute['attribute_id'],
'is_global',
\Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL
);
}
}
The feasible issue is the absence of the attribute from the list ['price', 'cost', 'special_price']
in your system. Maybe you’ve deleted one of them?
You can find all of them in the table eav_attribute
usin the query:
SELECT * FROM `eav_attribute` WHERE `attribute_code` IN ('price', 'cost', 'special_price')
You should see something similar to this:

If you want to restore your cost attribute use this query:
INSERT INTO eav_attribute (entity_type_id, attribute_code, attribute_model, backend_model, backend_type, backend_table, frontend_model, frontend_input, frontend_label, frontend_class, source_model, is_required, is_user_defined, default_value, is_unique, note) VALUES (4, 'cost', null, 'Magento\\Catalog\\Model\\Product\\Attribute\\Backend\\Price', 'decimal', null, null, 'price', 'Cost', null, null, 0, 1, null, 0, null);