ShapeFormer icon indicating copy to clipboard operation
ShapeFormer copied to clipboard

NameError: name 'plutil' is not defined

Open yhJang94 opened this issue 1 year ago • 1 comments

how can i solve this problem?

python -m shapeformer.trainer --opts configs/demo/demo_vqdif.yaml --gpu 0 --mode "run" **** INFO **** Choosing GPUS: [0] **** INFO **** Resetting GPUS ids to: [0] **** INFO **** Running single opt file Global seed set to 314 Traceback (most recent call last): File "/.conda/envs/shapeformer/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/.conda/envs/shapeformer/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/ShapeFormer/shapeformer/trainer.py", line 353, in trainer = Trainer(parsed.opts[0], mode='train', gpus=gpus) File "/ShapeFormer/shapeformer/trainer.py", line 61, in init self.load_model() File "/ShapeFormer/shapeformer/trainer.py", line 124, in load_model self.model = sysutil.instantiate_from_opt(self.opt.pl_model_opt) File "/ShapeFormer/xgutils/sysutil.py", line 279, in instantiate_from_opt return load_object(opt["class"])(**opt.get("kwargs", dict())) File "/ShapeFormer/xgutils/sysutil.py", line 273, in load_object return load_module_object(module_path, object_name) File "/ShapeFormer/xgutils/sysutil.py", line 255, in load_module_object modulelib = importlib.import_module(module_path) File "/.conda/envs/shapeformer/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "/ShapeFormer/shapeformer/models/vqdif/vqdif.py", line 170, in class VisRecon3D(plutil.VisCallback): NameError: name 'plutil' is not defined

yhJang94 avatar Jan 23 '24 06:01 yhJang94

It turns out this is due to the fact you are using a newer version of the xgutils library, where you can not import the utils by just from xgutils import *.

To resolve this problem, you can simply using the xgutils at version b549310, (which is also the commit number of branch 'shapeformer'). I have updated this repo, when you git clone --recursive [email protected]:QhelDIV/ShapeFormer.git you should automatically get the right version of xgutils.

Hope this method works for you. If not so, feel free to put more information here.

QhelDIV avatar Jan 24 '24 02:01 QhelDIV