Today's python error: invalid keyword argument for this function

The awesomeness of a combinatorial explosion https://qiita.com/kaizen_nagoya/items/f309b0c2bb015bbc71c3

so,

I tried using graphillion https://qiita.com/cabernet_rock/items/50f955afc16287244154

Was made into a file.

Nothing comes out when I run it.

Added print.

gra.py


# https://qiita.com/cabernet_rock/items/50f955afc16287244154
#Import required modules
from graphillion import GraphSet
import graphillion.tutorial as tl
import time              #Check the calculation time.
#Specify the size of the grid
universe = tl.grid(2, 2)
GraphSet.set_universe(universe)
tl.draw(universe)
start = 1 #Start position
goal = 9 #Goal position
paths = GraphSet.paths(start, goal)
print (len(paths))
#
key = 4        #1st place
treasure = 2   #2nd place
paths_to_key = GraphSet.paths(start, key).excluding(treasure)
treasure_paths = paths.including(paths_to_key).including(treasure)
print (len(treasure_paths))
#
universe = tl.grid(8, 8) #9x9 grid
GraphSet.set_universe(universe)
start = 1
goal = 81
s = time.time()          #Calculation start time
print  (paths = GraphSet.paths(start, goal))
time.time() - s #Calculation time
print (len(paths))

docker/ubuntu


# python3 gra.py
12
2
Traceback (most recent call last):
  File "gra.py", line 26, in <module>
    print  (paths = GraphSet.paths(start, goal))
TypeError: 'paths' is an invalid keyword argument for this function

print (paths = GraphSet.paths(start, goal))

To

paths = GraphSet.paths(start, goal) print (paths)

change to.

Recommended Posts

Today's python error: invalid keyword argument for this function
Today's python error: killed
Python function argument summary
[Python] for statement error
Today's python error: HTTPError: 404 Client Error: Not Found for url:
Python #function 2 for super beginners
Keyword arguments for Python functions
[Python3] Call by dynamically specifying the keyword argument of the function
Today's python error: SyntaxError Non-ASCII character
[python] Callback function (pass function as argument)
Function argument type definition in python
Today's python error: image is blank
Python #len function for super beginners
Basic Python operation 2nd: Function (argument)
Easy keyword extraction with TermExtract for Python
Today's python error: ModuleNotFoundError: No module named
Solution for pip install error [Python] [Mac]
Today's python error: ModuleNotFoundError: No module named
Today's python error: ModuleNotFoundError: No module named'requests'
Today's python error: ModuleNotFoundError: No module named'bs4'
python function ①
[Python] function
python function ②
[Python] I tried substituting the function name for the function name
Today's python error: UnicodeEncodeError:'ascii' codec can't encode characters
Understand Python for Pepper development. -Python box self-made function-
Note for formatting numbers with python format function
Today's python error: UnicodeEncodeError:'utf-8' codec can't encode characters