Plugin Registry Issue



  • On 28/03/2018 at 02:17, xxxxxxxx wrote:

    Hi everyone,
    I've wrote a python plugin that is currently working normally on a few machines, but have a couple that seem to have problems with windows registries?
    Has anyone had this issue or have a solution? I'm assuming that this is not related with Cinema 4D directly but with Windows Registry and Python 2.7.

      File "'checkOut.pyp'", line 7, in <module>_<_o:_<_o:p_>_o:p>
      File "C:\Users\shawry\AppData\Roaming\MAXON\CINEMA 4D R17_8DE13DAD\library\python\packages\win64\openpyxl\__init__.py", line 29, in <mod_<_o:_<_o:p_>_
        from openpyxl.workbook i_<_o:_<_o:p_>_orkbook
      File "C:\Users\shawry\AppData\Roaming\MAXON\CINEMA 4D R17_8DE13DAD\library\python\packages\win64\openpyxl\workbook\__init__.py", line_<_o:_<_o:p_>_<module>
        fr_<_o:_<_o:p_>_kbook import Workbook
      File "C:\Users\shawry\AppData\Roaming\MAXON\CINEMA 4D R17_8DE13DAD\library\python\packages\win64\openpyxl\workbook\workb_<_o:_<_o:p_>_, line 17, in <module>
        from openpyxl.wr_<_o:_<_o:p_>_cel import save_workbook, save_dump
      File "C:\Users\shawry\AppData\Roaming\MAXON\CINEMA 4D R17_8DE13DAD\library\python\packages\win64\open_<_o:_<_o:p_>_iter\excel.py", line 31, in <module>
      _<_o:_<_o:p_>_ from openpyxl.packaging.manifest import Manifest
      File "C:\Users\shawry\AppData\Roaming\MAXON\CINEMA 4D R17_8DE13DAD\library\python\packages\wi_<_o:_<_o:p_>_npyxl\packaging\manifest.py", line 41, in <module>_>
        mimetypes.init()
      File "C:\Program Files\MAXON\CINEMA 4D R17\resour_<_o:_<_o:p_>_les\python\Python.win64.framework\lib\mimetypes.py", line 351, in ini_<_o:_<_o:p_>_/o:p>
        db.read_windows_registry()
      File "C:\Program Files\MAXON\CINEMA 4D R17\resource\_<_o:_<_o:p_>_\python\Python.win64.framework\lib\mimetypes.py", line 254, in read_windows_registry_ 
        with _winreg.OpenKey(hkcr, subkeyname) as s_<_o:_<_o:p_>_o:p>
    TypeError: must be string without null bytes or None, not str
    

    Thank you very much in advance! 🙂
    Andre



  • On 29/03/2018 at 02:31, xxxxxxxx wrote:

    Hi Andre,

    not really sure how to tackle this.
    So just a few ideas for debugging:
    Can you get hold of the string that's causing the error in the end (and maybe print it to console)? Do you have an idea, where it's coming from? Is it already read from the registry or is it a result of some Cinema 4D API function?
    What about the environment? Are there any differences between the machines in terms of OS version and/or software installation? Just assuming from the module names you are trying to access some Excel file? Does the module maybe rely on something MS Office related to be installed on each machine?
    Looking into the code of the mimetypes.py module it seems to try to iterate of the registered MIME types there. So, maybe there's an invalid entry on those systems, where it's not working?



  • On 29/03/2018 at 05:09, xxxxxxxx wrote:

    Hi Andreas,

    Thank you for your help!
    I will try all debug ideas that you written.

    Think from a quick look that it may be your last question, which may be a corrupted registry or invalid entry.

    Haven't had a chance to have a proper look today, but will try asap and come back to you.

    Thank you again and have a Happy Easter! 🙂

    Kind regards,

    Andre


Log in to reply