ubisoft / mixer

Add-on for real-time collaboration in Blender.
https://ubisoft-mixer.readthedocs.io/
GNU General Public License v3.0
1.32k stars 77 forks source link

Can't enable Mixer on Linux #2

Closed MarcoFriedrichs closed 3 years ago

MarcoFriedrichs commented 3 years ago

Hi, first of all thank you very much for creating this awesome addon! I tried it out on Windows and it worked incredibly well, however when trying to install the addon on Linux (Mint 19.3) I get following error message:

Traceback (most recent call last):
  File "/home/marco/software/blender-2.83.3-linux64/2.83/scripts/modules/addon_utils.py", line 382, in enable
    mod.register()
  File "/home/marco/.config/blender/2.83/scripts/addons/mixer/__init__.py", line 87, in register
    from mixer import ui
  File "/home/marco/.config/blender/2.83/scripts/addons/mixer/ui.py", line 9, in <module>
    from mixer.bl_properties import UserItem
  File "/home/marco/.config/blender/2.83/scripts/addons/mixer/bl_properties.py", line 105, in <module>
    class MixerProperties(bpy.types.PropertyGroup):
  File "/home/marco/.config/blender/2.83/scripts/addons/mixer/bl_properties.py", line 202, in MixerProperties
    upload_room_name: bpy.props.StringProperty(default=f"{os.getlogin()}_uploaded_room", name="Upload Room Name")
OSError: [Errno 25] Inappropriate ioctl for device
Celeborn2BeAlive commented 3 years ago

Hi, thank you for reporting this issue !

Indeed we are working internally on Windows only, and we never tried Mixer on Linux. At some point that should be included in our process but not a priority right now.

It seems the error comes from the call os.getlogin(). A search on google show that other python developers have the same issues on some linux distribution. This link provides some workarounds: https://stackoverflow.com/questions/54167704/for-new-linux-users-what-is-an-easy-way-to-get-the-login-name-in-python

What we can do in the short term is encapsulate that function call in a function that try and apply a workaround if the error is raised. I will log that issue internaly and we'll come back to you here when we implement the workaround, so you can report to us if it works for you.

feeefeee commented 3 years ago

@MarcoFriedrichs I have pushed a commit (387b19d) that replaces os.getlogin() by the more portable getpass.getuser(). Can you try it ?

MarcoFriedrichs commented 3 years ago

@feeefeee Just tried it out and it works, thank you very much!