You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I have a problem with a python program, on the pygame library, in particular when I go to use the game object: Actor, can you help me understand how to solve it?
This is the program in python:
import pygame
import pgzrun
from os import listdir
from random import sample
WIDTH = 12800
HEIGHT = 7200
caselle = []
for n in range(7):
casella = Actor('neutra')
casella.pos = 602, 512-n*58
casella.append(casella)
def draw():
screen.surface = pygame.display.set_mode((WIDTH, HEIGHT), pygame.FULLSCREEN)
for casella in caselle:
casella.draw()
pgzrun.go()
But the terminal gives me this error message:
[Running] python -u "c:\Users\Administrator\Desktop\PytoProgram\PYSarabanda\sarabanda.py"
pygame 2.5.1 (SDL 2.28.2, Python 3.11.5)
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "c:\Users\Administrator\Desktop\PytoProgram\PYSarabanda\sarabanda.py", line 28, in
casella = Actor('neutra')
^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages\apify\actor.py", line 121, in init
self._apify_client = self.new_client()
^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages\apify_utils.py", line 298, in wrapper
return implementation(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages\apify\actor.py", line 488, in _new_client_internal
token = token or self._config.token
^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'token'
[Done] exited with code=1 in 3.672 seconds
What does it mean and how can I solve it?
The text was updated successfully, but these errors were encountered:
I am afraid, this is not the right place for this issue, as the raised error is on "apify" while you are here writing in the "flair" github.
I cannot help you as I neither know PyGame or Apify, but I suppose you'll find help when you ask in a PyGame forum or consider if you really want to use Apify
Question
Hi I have a problem with a python program, on the pygame library, in particular when I go to use the game object: Actor, can you help me understand how to solve it?
This is the program in python:
import pygame
import pgzrun
from os import listdir
from random import sample
WIDTH = 12800
HEIGHT = 7200
caselle = []
for n in range(7):
casella = Actor('neutra')
casella.pos = 602, 512-n*58
casella.append(casella)
def draw():
screen.surface = pygame.display.set_mode((WIDTH, HEIGHT), pygame.FULLSCREEN)
for casella in caselle:
casella.draw()
pgzrun.go()
But the terminal gives me this error message:
[Running] python -u "c:\Users\Administrator\Desktop\PytoProgram\PYSarabanda\sarabanda.py"
pygame 2.5.1 (SDL 2.28.2, Python 3.11.5)
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "c:\Users\Administrator\Desktop\PytoProgram\PYSarabanda\sarabanda.py", line 28, in
casella = Actor('neutra')
^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages\apify\actor.py", line 121, in init
self._apify_client = self.new_client()
^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages\apify_utils.py", line 298, in wrapper
return implementation(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages\apify\actor.py", line 488, in _new_client_internal
token = token or self._config.token
^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'token'
[Done] exited with code=1 in 3.672 seconds
What does it mean and how can I solve it?
The text was updated successfully, but these errors were encountered: