`ValueError: not enough values to unpack reported` when running MNIST example
Closed this issue · 2 comments
zl-xiang commented
Describe the bug
Hi,
I encountered a ValueError: not enough values to unpack
when running the provided examples as instruction told, error details shown as following:
stack trace:
Traceback (most recent call last):
File "Add/add.py", line 4, in <module>
from deepproblog.engines import ExactEngine
File "/Users/mac/Documents/Academic/projects/dissertation/deepproblog/src/deepproblog/engines/__init__.py", line 1, in <module>
from deepproblog.engines.approximate_engine import ApproximateEngine
File "/Users/mac/Documents/Academic/projects/dissertation/deepproblog/src/deepproblog/engines/approximate_engine.py", line 2, in <module>
from deepproblog.engines.prolog_engine import (
File "/Users/mac/Documents/Academic/projects/dissertation/deepproblog/src/deepproblog/engines/prolog_engine/__init__.py", line 1, in <module>
from .engine import PrologEngine
File "/Users/mac/Documents/Academic/projects/dissertation/deepproblog/src/deepproblog/engines/prolog_engine/engine.py", line 4, in <module>
from pyswip import Prolog
File "/usr/local/anaconda3/lib/python3.8/site-packages/pyswip/__init__.py", line 29, in <module>
from pyswip.prolog import Prolog
File "/usr/local/anaconda3/lib/python3.8/site-packages/pyswip/prolog.py", line 28, in <module>
from pyswip.core import *
File "/usr/local/anaconda3/lib/python3.8/site-packages/pyswip/core.py", line 567, in <module>
(_path, SWI_HOME_DIR) = _findSwipl()
File "/usr/local/anaconda3/lib/python3.8/site-packages/pyswip/core.py", line 416, in _findSwipl
(path, swiHome) = _findSwiplDar()
File "/usr/local/anaconda3/lib/python3.8/site-packages/pyswip/core.py", line 370, in _findSwiplDar
(path, swiHome) = _findSwiplFromExec()
File "/usr/local/anaconda3/lib/python3.8/site-packages/pyswip/core.py", line 93, in _findSwiplFromExec
rtvars = dict((name, value[1:-1]) for name, value in ret) # [1:-1] gets
File "/usr/local/anaconda3/lib/python3.8/site-packages/pyswip/core.py", line 93, in <genexpr>
rtvars = dict((name, value[1:-1]) for name, value in ret) # [1:-1] gets
ValueError: not enough values to unpack (expected 2, got 1)
To Reproduce
Steps to reproduce the behavior:
cd ~/deepproblog/src/
export PYTHONPATH=`pwd`
python3 deepproblog/examples/MNIST/addition.py
Desktop (please complete the following information):
- OS: macOS 11.4
- Python Version: 3.8
problog 2.1.0.42
PySDD 0.2.10
pyswip 0.2.10
torch 1.8.0
torchvision 0.9.0
Please help, thank you !
rmanhaeve commented
Hi mexicer. From your stack trace, this seems like a bug in pyswip instead. It seems to me like the same issue as this one: yuce/pyswip#76
Good luck.
zl-xiang commented
Hi mexicer. From your stack trace, this seems like a bug in pyswip instead. It seems to me like the same issue as this one: yuce/pyswip#76
Good luck.
I guess this could be a problem of OS, I'll try to run it on Linux, thanks !