Skip to content

Python typeerror #14

Open
Open
@greyfeathertx

Description

@greyfeathertx

I don't program in Python but it seems "Node" doesn't have a method for '>' operator?

C:\Users\micha\Desktop\mazesolving-master>python solve.py -m astar perfect4k.png 4k_solve.png
Loading Image
Creating Maze
Node Count: 2865504
Time elapsed: 32.22657132148743

Starting Solve: A-star Search
Traceback (most recent call last):
File "solve.py", line 89, in
main()
File "solve.py", line 86, in main
solve(sf, args.method, args.input_file, args.output_file)
File "solve.py", line 29, in solve
[result, stats] = solver(maze)
File "C:\Users\micha\Desktop\mazesolving-master\astar.py", line 80, in solve
unvisited.insert(vnode)
File "C:\Users\micha\Desktop\mazesolving-master\priority_queue.py", line 59, in insert
heapq.heappush(self.pq, entry)
TypeError: '<' not supported between instances of 'Node' and 'Node'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions