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

ValueError: not enough values to unpack reported when running MNIST example #1

Closed
zl-xiang opened this issue Jun 30, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@zl-xiang
Copy link

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:

  1. cd ~/deepproblog/src/
  2. export PYTHONPATH=`pwd`
  3. 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 !

@zl-xiang zl-xiang added the bug Something isn't working label Jun 30, 2021
@rmanhaeve
Copy link
Contributor

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
Copy link
Author

zl-xiang commented Jul 1, 2021

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 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants