distributed-uav-rl-protocol icon indicating copy to clipboard operation
distributed-uav-rl-protocol copied to clipboard

An error occurred while running simulation.py

Open yyyanwenhao opened this issue 3 years ago • 1 comments

152 item.setFlags(item.flags() ^ ( 153 Qt.ItemIsEditable | Qt.ItemIsSelectable)) 154 value.setFlags(value.flags() ^ ( 155 Qt.ItemIsEditable | Qt.ItemIsSelectable)) I want to know what these lines of code mean,becauseI got this error running simulation.py. " TypeError: unsupported operand type(s) for ^: 'ItemFlags' and 'ItemFlags' " But it worked fine when I commented out the four lines above. First of all, thank you very much for allowing me to learn the open source code. I hope you can reply me and help me solve my confusion.

yyyanwenhao avatar May 02 '22 12:05 yyyanwenhao

Hi @yyyanwenhao, those lines are responsible for some properties of the UI. In the specific case, they make items editable.

I don't have the environment anymore and I see we forgot to specify the package versions. However, if you want to give a try, I think we used PyQt5 5.15.3 to run the simulation.

LeonardoEmili avatar May 03 '22 13:05 LeonardoEmili