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

API using #168

Open
davsla12 opened this issue Aug 3, 2024 · 1 comment
Open

API using #168

davsla12 opened this issue Aug 3, 2024 · 1 comment

Comments

@davsla12
Copy link

davsla12 commented Aug 3, 2024

hello
im jung programmer and i try it API to get score and save it but i foung issues wen i import automated_skeleton the run-auto.py file returne this

C:\Users\DavSlav\Documents\PyCharm_project's\youre the os>python run-auto.py skript.py
pygame 2.5.2 (SDL 2.28.3, Python 3.12.2)
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "C:\Users\DavSlav\Documents\PyCharm_project's\youre the os\src\auto.py", line 137, in
asyncio.run(main())
File "C:\Users\DavSlav\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Users\DavSlav\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\DavSlav\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 685, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\DavSlav\Documents\PyCharm_project's\youre the os\src\auto.py", line 135, in main
await game_manager.play(ignore_events=True)
File "C:\Users\DavSlav\Documents\PyCharm_project's\youre the os\src\engine\game_manager.py", line 138, in play
self._scene_manager.start_scene(self.startup_scene)
File "C:\Users\DavSlav\Documents\PyCharm_project's\youre the os\src\engine\scene_manager.py", line 45, in start_scene
self._scenes[scene_id].setup()
File "C:\Users\DavSlav\Documents\PyCharm_project's\youre the os\src\scenes\stage.py", line 98, in setup
self._prepare_automation_script()
File "C:\Users\DavSlav\Documents\PyCharm_project's\youre the os\src\scenes\stage.py", line 213, in _prepare_automation_script
exec(self._script, script_globals)
File "../skript.py", line 1, in
from automated_skeleton import *
ModuleNotFoundError: No module named 'automated_skeleton'

skript.py contains from automated_skeleton import *

@plbrault
Copy link
Owner

plbrault commented Aug 7, 2024

Hello,

The automated_skeleton.py file is not meant to be imported. It is a template that you can copy and adapt in order to create your own automation script. Say you copy the content of automated_skeleton.py to myscript.py, you can then run it using the command pipenv run myscript.py. Also make sure that your script is at the root of the repo (same directory as the skeleton).

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

No branches or pull requests

2 participants