Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: AttributeError: 'str' object has no attribute 'token' #3315

Closed
Frenks7 opened this issue Sep 11, 2023 · 1 comment
Closed

[Question]: AttributeError: 'str' object has no attribute 'token' #3315

Frenks7 opened this issue Sep 11, 2023 · 1 comment
Labels
question Further information is requested

Comments

@Frenks7
Copy link

Frenks7 commented Sep 11, 2023

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?

@Frenks7 Frenks7 added the question Further information is requested label Sep 11, 2023
@helpmefindaname
Copy link
Collaborator

Hi @Frenks7

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants