fix: python: retriving pkg.type.

The exact error was "SystemError: bad format char passed to Py_BuildValue".