ctamon / quantum-walk-on-graphs

Visual Simulation of Quantum Walk on Graphs
7 stars 2 forks source link

Running qwalk.py #1

Open sidneyholden1 opened 7 years ago

sidneyholden1 commented 7 years ago

Hi there,

I'm very new to GitHub so I'm not sure if this is where I should be commenting. But here goes:

I've finally managed to import pygame, but now when I try to run:

python3 qwalk.py

in the command line (python qwalk.py still won't import pygame), I get this error:

Traceback (most recent call last): File "qwalk.py", line 122, in qwalk_me(A) File "qwalk.py", line 87, in qwalk_me pygame.draw.line(DISPLAYSURF, BLUE, Vertex[edge[0]], Vertex[edge[1]], thickness) TypeError: 'map' object is not subscriptable

Any help would be much appreciated.

sidneyholden1 commented 7 years ago

Just had to add list() to every map(...) i.e. list(map(...)).

The issue was that the syntax is different in Python 3. (what I'm now using).