У меня есть программа которая берет статистику игрока с сайта и показывает ёё в программе. Но когда я ввожу никнейм то мне выходит ошибка:
Traceback (most recent call last): File "C:\Program Files\Python\lib\tkinter\__init__.py", line 1550, in __call__ return self.func(*args) File "C:\Users\MAKSIK\Desktop\Fortnite\test3.py", line 23, in Search Label(root, stats.wins).place(y = 50) File "C:\Program Files\Python\lib\tkinter\__init__.py", line 2606, in __init__ Widget.__init__(self, master, 'label', cnf, kw) File "C:\Program Files\Python\lib\tkinter\__init__.py", line 2135, in __init__ classes = [(k, v) for k, v in cnf.items() if isinstance(k, type)] AttributeError: 'str' object has no attribute 'items'
Вот весь код:
from fortnite_python import Fortnite
from fortnite_python.domain import Platform
from fortnite_python.domain import Mode
import tkinter as tk
from tkinter import *
root = Tk()
root.geometry('700x600')
ment = StringVar()
entryBox = Entry(root,textvariable=ment)
entryBox.place(x = 280, y = 5)
fortnite = Fortnite('dc4c889e-af19-4e65-8257-8061d3fc453f')
def Search():
mtext = ment.get()
player = fortnite.player(mtext, Platform.PSN)
stats = player.getStats(Mode.DUO)
Label(root, stats.wins).place(y = 50)
Button(root, text='Search', command=Search).place(x = 410, y = 5)