eth-ait / aitviewer

A set of tools to visualize and interact with sequences of 3D data.
MIT License
497 stars 46 forks source link

BUG: Compatible Issue #16

Closed YingGwan closed 1 year ago

YingGwan commented 1 year ago

I have tried to compile aitviewer in windows and ubuntu 20.04, but encountered same problems:

  1. Ubuntu: Anaconda; Python = 3.9.7; Error detail: File "/home/yingjun/anaconda3/envs/test/lib/python3.9/site-packages/_moderngl.py", line 344, in data = b''.join(struct.pack(self._fmt, row) for row in value) TypeError: Value after must be an iterable, not int

  2. Windows 10. Anaconda; Python = 3.9.7 Error Detail: File "H:\anaconda3\lib\site-packages\moderngl-5.7.2-py3.9-win-amd64.egg_moderngl.py", line 344, in data = b''.join(struct.pack(self._fmt, row) for row in value) TypeError: Value after must be an iterable, not int

Could you help on this and indicate which version I should use to solve this issue?

YingGwan commented 1 year ago

I have tried several Python Versions and none of them are successful.

kaufManu commented 1 year ago

Hi @YingGwan

Thanks for reporting this. I just tested this locally and I was able to reproduce it. It's a problem with moderngl - the latest version seems to have this issue. I was able to resolve this if I downgrade to moderngl 5.6.4, i.e.

pip install moderngl==5.6.4

Can you let me know if this fixes your problem? If so, we'll get this sorted with the next release.

YingGwan commented 1 year ago

fig_resolved

This problem has been solved, many thanks!

kaufManu commented 1 year ago

Good to hear!

I'm opening this again for our reference, to be included in the next release.

The respective bug report in moderngl is: https://github.com/moderngl/moderngl/issues/525 This seems to be a problem as of moderngl version 5.7.1. We can simply fix this by specifying an earlier version in setup.py.

YingGwan commented 1 year ago

Hi, When I want to load STAR dataset using: pip install git+https://github.com/ahmedosman/STAR.git

It appeared this error: Collecting git+https://github.com/ahmedosman/STAR.git Cloning https://github.com/ahmedosman/STAR.git to c:\users\tiany\appdata\local\temp\pip-req-build-lsrye9fk Running command git clone -q https://github.com/ahmedosman/STAR.git 'C:\Users\tiany\AppData\Local\Temp\pip-req-build-lsrye9fk' Resolved https://github.com/ahmedosman/STAR.git to commit bc6aa8d9be1192ce90d394fdf8898347ec31fe39 ERROR: Command errored out with exit status 1: command: 'H:\anaconda3\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\tiany\AppData\Local\Temp\pip-req-build-lsrye9fk\setup.py'"'"'; file='"'"'C:\Users\tiany\AppData\Local\Temp\pip-req-build-lsrye9fk\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\tiany\AppData\Local\Temp\pip-pip-egg-info-0dppz9u7' cwd: C:\Users\tiany\AppData\Local\Temp\pip-req-build-lsrye9fk\ Complete output (5 lines): Traceback (most recent call last): File "", line 1, in File "C:\Users\tiany\AppData\Local\Temp\pip-req-build-lsrye9fk\setup.py", line 24, in long_description = fh.read() UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 3989: illegal multibyte sequence

WARNING: Discarding git+https://github.com/ahmedosman/STAR.git. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Could you help with it, many thanks!

kaufManu commented 1 year ago

Hmm, I cannot reproduce this on my machine unfortunately (also Windows).

What if you clone the STAR repo instead and do python setup.py install in the cloned directory (or pip install -e .)?

totomobile43 commented 1 year ago

Since we cannot reproduce this (and it may be a STAR repo issue), I would suggest trying the following:

  1. Clone the STAR repo locally
  2. Modify the setup.py file as follows: On line 23, replace with open("README.md", "r") as fh: with with open("README.md", "r", encoding="UTF-8") as fh:
  3. Run pip install -e

Another thing to make sure is that the path that STAR is placed in should only have ascii characters in it.

milkshilin commented 1 year ago

hello,great job maker, May i have a question ,when i run Load_STAR, why should i load a STAR Sequece from AMASS data?and i dont know where to get -Female1 run tostand -as a NPZ data.

kaufManu commented 1 year ago

Hi @milkshilin

This is just supposed to be an example to get some pose data. If you find it easier, you could just display a T-pose with STAR as follows:

if __name__ == '__main__':
    star_layer = STARLayer(device=C.device)
    star_seq = STARSequence.t_pose(model=star_layer)
    v = Viewer()
    v.scene.add(star_seq)
    v.run()

You can download the AMASS data from their official website (you will have to create a login and accept a license agreement to do so). The npz file we reference in the code can be obtained by downloading the ACCAD SMPL+H G version on the downloads section of the website.

kaufManu commented 1 year ago

Closing this issue, feel free to re-open if required.