NicolasBizzozzero / nonogram

A nonogram/picross/griddler solver written in Python 3
GNU General Public License v3.0
10 stars 0 forks source link

[Trouble feedback] Unable to execute the module #1

Closed Dragon1573 closed 4 years ago

Dragon1573 commented 4 years ago

Hello @NicolasBizzozzero ,

I have installed this package through PyPI . But I can't execute this packages. The error log are as follows:

legen@Legend1949 MINGW64 /Repos/PyChallenge-Tips (master)
$ nonogram.exe resources/Quiz32/warmup.txt
Traceback (most recent call last):
  File "c:\users\legen\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\legen\anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\legen\Anaconda3\Scripts\nonogram.exe\__main__.py", line 4, in <module>
  File "c:\users\legen\anaconda3\lib\site-packages\nonogram\main.py", line 6, in <module>
    from nonogram.src.core.nonogram import nonogram
  File "c:\users\legen\anaconda3\lib\site-packages\nonogram\src\core\nonogram.py", line 3, in <module>
    from solveurs.solveur_utils import SolvingMethod, CASE_VIDE
ModuleNotFoundError: No module named 'solveurs'

The README of this project mentioned about the Gurobi Optimizer in Requirements section. Should I install this application before installing and executing this package?

Please do me a favour, thank you!

NicolasBizzozzero commented 4 years ago

Hello ! The error you are having is my fault, I'm wrongly importing some of the modules. I'm solving it right now do not worry. Also, yes you must install the proprietary Gurobi Optimizer. There is a free version which should work. I would have preferred using another software, but this one has been imposed to me by my university...

NicolasBizzozzero commented 4 years ago

nonogram should work better now. Please uninstall nonogram with the command :

pip uninstall nonogram

And reinstall it with the command:

pip install "nonogram==3.1.1"

I also uploaded instances examples you can try the solver with, they are located here

Dragon1573 commented 4 years ago

Yes, and it works as we expected. I tested other 2 files and they are located at:

I has modified the above files before tests in order to match the required file structure. And none of them went wrong!

warmup up.png

I'm using Anaconda as my default Python integrated environment without installing Gurobi Optimizer, but it still work as normal and pop up the solution figure. So I can't sure if Gurobi Optimizer is required, maybe it's required for original Python releases?


By the way, I'm sorry for failing to respond to your message in time. I had looked for another package and finished my work. Thank you!

NicolasBizzozzero commented 4 years ago

I'm glad all worked for you ! No need to excuse yourself, you can respond when you have time :)

The reason it worked for you even without Gurobi installed is because the default algorithm (implemented here) used try to solve it with dynamic programming only, and fallback to linear programming if it is not finished. For your instances, dynamic programming only was sufficient, but I remember that some instances required linear programming (and thus Gurobi) to be completed.

I really need to explain all of this in the README, I will update it when I have some time !

Dragon1573 commented 4 years ago

That sounds great! I can't waiting for your new features!

I'll close this issue. Thanks!