Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start on Ubuntu 22.04 (Python 3.10.4) #209

Open
20kdc opened this issue Aug 12, 2022 · 16 comments
Open

Unable to start on Ubuntu 22.04 (Python 3.10.4) #209

20kdc opened this issue Aug 12, 2022 · 16 comments
Labels

Comments

@20kdc
Copy link

20kdc commented Aug 12, 2022

The following error occurs with makehuman-community 1.2.0+20201105183027-1ppa1 on Ubuntu 22.04, Python 3.10.4:

error: module 'collections' has no attribute 'Callable'
Traceback (most recent call last):
  File "/usr/share/makehuman-community/makehuman.py", line 566, in main
    init_logging()
  File "/usr/share/makehuman-community/makehuman.py", line 198, in init_logging
    log.init()
  File "/usr/share/makehuman-community/./lib/log.py", line 249, in init
    if hasattr(logging, "captureWarnings") and isinstance(logging.captureWarnings, collections.Callable):
AttributeError: module 'collections' has no attribute 'Callable'
@Slavek592
Copy link

Comment/erase lines with this error, the comment above says it is something for Python 2.

@20kdc
Copy link
Author

20kdc commented Aug 12, 2022

Doing that has this result:

Traceback (most recent call last):
  File "/usr/share/makehuman-community/makehuman.py", line 599, in <module>
    main()
  File "/usr/share/makehuman-community/makehuman.py", line 589, in main
    from mhmain import MHApplication
  File "/usr/share/makehuman-community/./core/mhmain.py", line 44, in <module>
    import mh
  File "/usr/share/makehuman-community/./lib/mh.py", line 50, in <module>
    from qtui import Keys, Buttons, Modifiers, Application
  File "/usr/share/makehuman-community/./lib/qtui.py", line 49, in <module>
    import qtgui
  File "/usr/share/makehuman-community/./lib/qtgui.py", line 48, in <module>
    import language
  File "/usr/share/makehuman-community/./lib/language.py", line 116, in <module>
    class OrderedSet(collections.MutableSet):
AttributeError: module 'collections' has no attribute 'MutableSet'

It seems like Python decided to do it's usual thing of breaking compatibility for no reason - they moved it to collections.abc

@Slavek592
Copy link

It is almost the same error, erasing it also helped me to overcome the problem.

@joepal1976
Copy link
Contributor

The problem is that ubuntu 22.04 has a python 3 version which is not entirely backwards compatible with the python version used for the latest build in the PPA.

There are also other problems with the ppa build for 22.04, stemming from an incompatibility with the available pyqt version.

We're working on updating these issues, and have committed several fixes to the master branch, but we won't make a new build until we're sure we're not causing more trouble than we're solving with the qt changes.

However, running from source is pretty easy on linux. You could try to follow those instructions and see if you get something up and running that way.

For instructions, see the readme in https://github.com/makehumancommunity/makehuman/blob/master/README.md

@20kdc
Copy link
Author

20kdc commented Aug 14, 2022

That worked perfectly, thank you.
I'm not sure if I should close this as it still applies to the latest release, but master does work.

@joepal1976
Copy link
Contributor

We can keep it open. I'm sure more people will run into the same issue, and hopefully find this thread.

If you're up to it, can you also take a look at #208 and #206 to see if anything like those happens to you?

@20kdc
Copy link
Author

20kdc commented Aug 15, 2022

In regards to #208 it seems to work just fine
I may be misunderstanding the intended behaviour though
Right-drag is just zoom in/out and that seems fine to me

I do not get #206 at all in any way

EDIT: Both tests done on master branch, commit f8ff3bc

@joepal1976
Copy link
Contributor

Thank you. And mostly related to those other issues: what graphics card are you using?

@20kdc
Copy link
Author

20kdc commented Aug 15, 2022

Extended renderer info (GLX_MESA_query_renderer):
    Vendor: AMD (0x1002)
    Device: AMD Radeon Vega 3 Graphics (raven2, LLVM 14.0.0, DRM 3.42, 5.15.0-43-generic) (0x15d8)
    Version: 22.2.0
    Accelerated: yes
    Video memory: 2048MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2

@rwbaer
Copy link
Collaborator

rwbaer commented Aug 19, 2022

Explanation of "right click zoom" problem
If you left click on the hand and right-click drag to zoom in, the hand should be centered during zoom/
If you left click on the face and right click drag to zoom in, the face should be centered, etc.

On Windows, at least, it seems to just "zoom in" but not centered to the body part you clicked on.

EDIT: doing a render seems to partially restore the click and drag behavior but the "centering target" seems not quite in place.

@20kdc
Copy link
Author

20kdc commented Aug 19, 2022

I get the behaviour you describe of a lack of "following" the right click position on Linux (on the above-described system configuration).

@Aranuvir Aranuvir added the Fixed label Sep 3, 2022
@WeedStasha
Copy link

Sorry I'm new to this whole Github thing, I hope I'm doing this right?

I got the same error on Windows 10 and AMD Radeon R5 Graphics when running the Installer Version of MakeHuman 12x. I managed to solve it by modifying multiple files in the ./lib folder:

log.py in line 51:

# change  import collections to import collections.abc

import collections.abc

language.py in line 47:

# change  import collections to the following
import sys
import collections
if sys.version_info.major == 3 and sys.version_info.minor >= 10:
   from collections.abc import MutableSet
   collections.MutableSet = collections.abc.MutableSet
else:
   from collections import MutableSet

qtgui.py in line 978:

# change  self.setValue(min_ + progress * (max_ - min_)) to the following
       self.setValue(int(min_ + progress * (max_ - min_)))

qtui.py in line 358:

# add type conversion
width = int(width)
height = int(height)

I Hope this helps someone encountering the same problem. I have seen that the build from source of course solved the problem while leaving less redundent code, so this is pretty situational of course.

@luzpaz
Copy link

luzpaz commented Aug 14, 2023

Is this still relevant ?

@tavasti
Copy link

tavasti commented Feb 5, 2024

This happens also in Debian 12

@GustavoRuben
Copy link

For Ubuntu 22.04. I add what @WeedStasha said.

Modifying the following file:
makehuman/core/guicommon.py
in line 145:
change collections to collections.abc

if not self._view or not isinstance(self._view, collections.abc.Callable):

And MakeHuman Community v1.2.0 will start normally.

@world-is-peace
Copy link

I did what @WeedStasha and @GustavoRuben suggested, MH starting, but now I get strange glitch:
Screenshot from 2024-03-08 18-16-46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants