Having trouble exporting products from Magento 2.x.
When I do an export from System > Export and select Entity Type of Products I'm receiving a Fatal Error.
Fatal error: Uncaught Error: Call to a member function getName() on null in C:\Web\gpp-magento2\vendor\magento\module-catalog-import-export\Model\Export\Product.php:442 Stack trace: #0 C:\Web\gpp-magento2\vendor\magento\module-catalog-import-export\Model\Export\Product.php(410): Magento\CatalogImportExport\Model\Export\Product->initCategories() #1 C:\Web\gpp-magento2\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php(111): Magento\CatalogImportExport\Model\Export\Product->__construct(Object(Magento\Framework\Stdlib\DateTime\Timezone), Object(Magento\Eav\Model\Config), Object(Magento\Framework\App\ResourceConnection), Object(Magento\Store\Model\StoreManager), Object(Magento\Framework\Logger\Monolog), Object(Magento\Catalog\Model\ResourceModel\Product\CollectionFactory), Object(Magento\ImportExport\Model\Export\Config), Object(Magento\Catalog\Model\ResourceModel\ProductFactory), Object(Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory), Object(Magento\Catalog\Model\ResourceModel\Category in C:\Web\gpp-magento2\vendor\magento\module-catalog-import-export\Model\Export\Product.php on line 442
A little background about this magento2 project, we are in the slow process of moving away from our Mage 1.9 store. We have been through the migration process and tying up some loose ends. Today I ran into the above while attempting an export to test the functionality of exporting products and reimporting them to observe changes.