kody-black / SecKill

一个超级好用的抢单软件(支持淘宝/京东)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

type error

yueru-mylove opened this issue · comments

File "D:\python_projects\SecKill-main\main.py", line 296, in
myDlg = MainDialog()
File "D:\python_projects\SecKill-main\main.py", line 31, in init
self.move((self.screen.width() - size.width() - 80), (self.screen.height() - size.height()) / 2)
TypeError: arguments did not match any overloaded call:
move(self, QPoint): argument 1 has unexpected type 'int'
move(self, int, int): argument 2 has unexpected type 'float'

python 3.10.0

If there is only a problem with the 'move' function, then you can delete this function directly, and it will not have much impact.
But if there are other problems, it may be a problem with your python version, you can try it with python3.7

File "D:\python_projects\SecKill-main\main.py", line 296, in myDlg = MainDialog() File "D:\python_projects\SecKill-main\main.py", line 31, in init self.move((self.screen.width() - size.width() - 80), (self.screen.height() - size.height()) / 2) TypeError: arguments did not match any overloaded call: move(self, QPoint): argument 1 has unexpected type 'int' move(self, int, int): argument 2 has unexpected type 'float'

python 3.10.0

You need to make sure that both arguments passed to the move method are integers. This can be fixed by converting the second argument to an integer, which can be done using the int() function.

self.move((self.screen.width() - size.width() - 80), (self.screen.height() - size.height()) / 2) change to
self.move((self.screen.width() - size.width() - 80), int((self.screen.height() - size.height()) / 2))