SerpentAI Error: The Plugin definition specifies an invalid pluggable - python-3.x

I recently installed SerpentAI and I'm having an issue when creating a game plugin.
When running the command:
'''
serpent generate game
'''
It throws errors like SerpentAI Error When Creating a Game Plugin The inside is the same, and I tried the inside method, but it didn't work. Someone can help me
What is the name of the game? (Titleized, No Spaces i.e. AwesomeGame):
THProject
How is the game launched? (One of: 'steam', 'executable', 'web_browser'):
executable
c:\users\28734\.conda\envs\serpent\lib\site-packages\offshoot\base.py:38: UserWarning: 'offshoot.yml' not found! Using default configuration.
warnings.warn("'offshoot.yml' not found! Using default configuration.")
c:\users\28734\.conda\envs\serpent\lib\site-packages\offshoot\base.py:38: UserWarning: 'offshoot.yml' not found! Using default configuration.
warnings.warn("'offshoot.yml' not found! Using default configuration.")
OFFSHOOT: Attempting to install SerpentTHProjectGamePlugin...
c:\users\28734\.conda\envs\serpent\lib\site-packages\offshoot\base.py:38: UserWarning: 'offshoot.yml' not found! Using default configuration.
warnings.warn("'offshoot.yml' not found! Using default configuration.")
OFFSHOOT PLUGIN INSTALL: Verifying that plugin dependencies are installed...
OFFSHOOT PLUGIN INSTALL: Installing files...
There was a problem during installation... Reverting!
Traceback (most recent call last):
File "c:\users\28734\.conda\envs\serpent\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\28734\.conda\envs\serpent\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\28734\.conda\envs\serpent\plugins\SerpentTHProjectGamePlugin\plugin.py", line 28, in <module>
offshoot.executable_hook(SerpentTHProjectGamePlugin)
File "c:\users\28734\.conda\envs\serpent\lib\site-packages\offshoot\base.py", line 185, in executable_hook
plugin_class.install()
File "c:\users\28734\.conda\envs\serpent\lib\site-packages\offshoot\plugin.py", line 35, in install
cls.install_files()
File "c:\users\28734\.conda\envs\serpent\lib\site-packages\offshoot\plugin.py", line 118, in install_files
raise e
File "c:\users\28734\.conda\envs\serpent\lib\site-packages\offshoot\plugin.py", line 91, in install_files
is_valid, messages = cls._validate_file_for_pluggable(plugin_file_path, file_dict["pluggable"])
File "c:\users\28734\.conda\envs\serpent\lib\site-packages\offshoot\plugin.py", line 235, in _validate_file_for_pluggable
raise PluginError("The Plugin definition specifies an invalid pluggable: %s => %s" % (file_path, pluggable))
offshoot.plugin.PluginError: The Plugin definition specifies an invalid pluggable: plugins\SerpentTHProjectGamePlugin\files\serpent_THProject_game.py => Game

I solved the problem myself. Installed 'serpent.game'.
All third-party libraries in the agent are sufficient. Some libraries are not installed

Related

AWS SAM giving error Unsupported Lambda runtime nodejs18.x

I am trying to run a simple lambda function using AWS sam, version(1.57.0)
I've installed in my ubuntu system nodejs version 14.18.3
When I try to run the project it gives errorUnsupported Lambda runtime nodejs18.x
Below is the full stacktrace
Invoking index.handler (nodejs18.x)
Traceback (most recent call last):
File "samcli/__main__.py", line 12, in <module>
File "click/core.py", line 829, in __call__
File "click/core.py", line 782, in main
File "click/core.py", line 1259, in invoke
File "click/core.py", line 1259, in invoke
File "click/core.py", line 1066, in invoke
File "click/core.py", line 610, in invoke
File "click/decorators.py", line 73, in new_func
File "click/core.py", line 610, in invoke
File "samcli/lib/telemetry/metric.py", line 176, in wrapped
File "samcli/lib/telemetry/metric.py", line 126, in wrapped
File "samcli/lib/utils/version_checker.py", line 41, in wrapped
File "samcli/cli/main.py", line 86, in wrapper
File "samcli/commands/local/invoke/cli.py", line 106, in cli
File "samcli/commands/local/invoke/cli.py", line 183, in do_cli
File "samcli/commands/local/lib/local_lambda.py", line 144, in invoke
File "samcli/lib/telemetry/metric.py", line 240, in wrapped_func
File "samcli/local/lambdafn/runtime.py", line 177, in invoke
File "samcli/local/lambdafn/runtime.py", line 88, in create
File "samcli/local/docker/lambda_container.py", line 91, in __init__
ValueError: Unsupported Lambda runtime nodejs18.x
[43955] Failed to execute script __main__
I did have node version 18 installed in the system prior to this. I thought that may be giving the issue so I uninstalled that version and installed version 14.
I don't have any idea why sam is running it on node version 18
I just recently looked into this as well since Node 18 is the current LTS. If you go to the Serverless Image Repository you'll see that AWS SAM doesn't currently have an image for Node 18. There's an explanation about this in this Github issue.

Spyder: An error ocurred while starting the kernel [duplicate]

I have a problem with the Spyder software of Python(version 4.0.1) regarding the running kernels in the IPython Console. Accordingly, I have tried many ways to resolve the issue like running some commands in Anaconda prompt or set the settings to the default mode. I even updated the version of my anaconda and the spyder. Nevertheless, nothing has been changed and the issue still exists.
This is the error I am receiving:
Traceback (most recent call last): File
"C:\ProgramData\Anaconda3\lib\runpy.py", line 193, in
_run_module_as_main "main", mod_spec) File "C:\ProgramData\Anaconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals) File
"C:\ProgramData\Anaconda3\lib\site‑packages\spyder_kernels\console__main__.py",
line 11, in start.main() File
"C:\ProgramData\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py",
line 287, in main import_spydercustomize() File
"C:\ProgramData\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py",
line 39, in import_spydercustomize import spydercustomize File
"C:\ProgramData\Anaconda3\lib\site‑packages\spyder_kernels\customize\spydercustomize.py",
line 24, in from IPython.core.getipython import get_ipython File
"C:\ProgramData\Anaconda3\lib\site‑packages\IPython__init__.py", line
56, in from .terminal.embed import embed File
"C:\ProgramData\Anaconda3\lib\site‑packages\IPython\terminal\embed.py",
line 14, in from IPython.core.magic import Magics, magics_class,
line_magic File
"C:\ProgramData\Anaconda3\lib\site‑packages\IPython\core\magic.py",
line 20, in from . import oinspect File
"C:\ProgramData\Anaconda3\lib\site‑packages\IPython\core\oinspect.py",
line 30, in from IPython.lib.pretty import pretty File
"C:\ProgramData\Anaconda3\lib\site‑packages\IPython\lib\pretty.py",
line 82, in import datetime File "C:\Users\mahkam\datetime.py", line
4 ^ SyntaxError: EOF while scanning triple‑quoted string literal
(Spyder maintainer here) You need to rename or remove this file
C:\Users\mahkam\datetime.py
That's because that file is using the same name of Python internal module and that confuses other modules that depend on it.
Looks like you have a quoting error
File "C:\Users\mahkam\datetime.py", line 4 ^ SyntaxError: EOF while scanning triple‑quoted string literal
Check out your datetime.py

Unable to Start Scheduler

I am new to Python and trying to install Airflow in my Mac, by following this tutorial
While these two commands work fine:
$ airflow initdb
$ airflow webserver -p 8080
The scheduler command (airflow scheduler) throws the following error:
[2020-02-18 13:18:09,012] {scheduler_job.py:1382} ERROR - Exception when executing execute_helper Traceback (most recent call last):
File "/Users/mac/Workspace/airflow/airflow_venv/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1380, in _execute
self._execute_helper()
File "/Users/mac/Workspace/airflow/airflow_venv/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1413, in _execute_helper
self.processor_agent.start()
File "/Users/mac/Workspace/airflow/airflow_venv/lib/python3.8/site-packages/airflow/utils/dag_processing.py", line 554, in start
self._process.start()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context.py", line 283, in _Popen
return Popen(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in __init__
super().__init__(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__
self._launch(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch
reduction.dump(process_obj, fp)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'SchedulerJob._execute.<locals>.processor_factory'
[2020-02-18 13:18:09,035] {helpers.py:322} INFO - Sending Signals.SIGTERM to GPID None
Traceback (most recent call last): File "/Users/mac/Workspace/airflow/airflow_venv/bin/airflow", line 37, in <module>
args.func(args) File "/Users/mac/Workspace/airflow/airflow_venv/lib/python3.8/site-packages/airflow/utils/cli.py", line 75, in wrapper
return f(*args, **kwargs) File "/Users/mac/Workspace/airflow/airflow_venv/lib/python3.8/site-packages/airflow/bin/cli.py", line 1040, in scheduler
job.run() File "/Users/mac/Workspace/airflow/airflow_venv/lib/python3.8/site-packages/airflow/jobs/base_job.py", line 221, in run
self._execute() File "/Users/mac/Workspace/airflow/airflow_venv/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1384, in _execute
self.processor_agent.end() File "/Users/mac/Workspace/airflow/airflow_venv/lib/python3.8/site-packages/airflow/utils/dag_processing.py", line 707, in end
reap_process_group(self._process.pid, log=self.log) File "/Users/mac/Workspace/airflow/airflow_venv/lib/python3.8/site-packages/airflow/utils/helpers.py", line 324, in reap_process_group
signal_procs(sig) File "/Users/mac/Workspace/airflow/airflow_venv/lib/python3.8/site-packages/airflow/utils/helpers.py", line 293, in signal_procs
os.killpg(pgid, sig)
TypeError: an integer is required (got type NoneType)
EDIT: Python 3.8 is supported now https://github.com/apache/airflow#requirements. So this answer might not be relevant now.
This due to the Python version you are using. Airflow doesn't support Python 3.8 yet https://github.com/apache/airflow#stable-version-1109.
Downgrade your Python to 3.7 and check.
Maybe there are some compatibility problems?
Using Python 3.6.10 and airflow v1.10.4, I can get airflow running. Maybe you could try some other versions?
This worked for me!
1- Make sure you are using the correct celery version that supports your other packages like RabbitMQ ( as V5 doesn't support AMQP in its usual format), my advice is to use V4.6.X
2-THIS HAS NOTHING TO DO WITH PYTHON VERSION IF YOU ARE USING AIRFLOW V2.0
3- simply make yourself happy with airflow db reset (command may differ if you are using airflow Version X<2.0 )
4- Avoid deleting any dag like you delete a file and use airflow dag ... commands to do so. (it makes up a mess in your environment that you wont like, trust me on this..)
Wish you luck bearing python stuff..

KeyError when deploying Python Function App on Azure

I'm new to azure and I'm getting this KeyError when deploying my python function on Azure portal, not sure what is the reason.
I have added just one package, "tweepy == 3.8.0" in my requirements.txt and it seems like it is crashing mostly right during it's installation during deployment, And the PySocks package is probably just a dependency for tweepy package.
I have no such issues when the debug it locally. The function runs absolutely fine locally.
How can I resolve this deployment issue?
Error:
There was an error restoring dependencies. Traceback (most recent call last):
File "C:\Users\anjan\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\anjan\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\anjan\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\tools\python\packapp\__main__.py", line
234, in <module>
main()
File "C:\Users\anjan\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\tools\python\packapp\__main__.py", line
60, in main
find_and_build_deps(args)
File "C:\Users\anjan\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\tools\python\packapp\__main__.py", line
142, in find_and_build_deps
wheel.install(paths, maker)
File "C:\Users\anjan\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\tools\python\packapp\distlib\wheel.py",
line 519, in install
row = records[u_arcname]
KeyError: 'PySocks-1.7.0.dist-info/'
"func: pack" task has been a common problem for users. I could solve it by trying a preview feature that is meant to address this: https://github.com/microsoft/vscode-azurefunctions/wiki/Server-Side-Build

Failed to create a device file using `uinput` module. Python3 on Ubuntu for Windows

I have a python script that runs on python3.4 and uses the package keyboard to allow for keybinds;
keyboard.add_hotkey("enter", self.listener.stop, suppress=True)
keyboard.add_hotkey("shift+enter", self.listener.finish, suppress=True)
When I run this on Windows, it works perfectly listening to both hotkeys, also when run on linux (CentOS) it works.
At work I've gotten a Ubuntu environment on my windows via the windows 10 feature and app store. However this environment has a problem with this keyboard hotkey.
/usr/local/lib/python3.6/dist-packages/keyboard-0.13.2-py3.6.egg/keyboard/_nixkeyboard.py:110: UserWarning: Failed to create a device file using `uinput` module. Sending of events may be limited or unavailable depending on plugged-in devices.
device = aggregate_devices('kbd')
Traceback (most recent call last):
File "main.py", line 32, in <module>
], 'test')
File "/mnt/.../can_controller.py", line 28, in __init__
self.__initialise_key_handler()
File "/mnt/.../can_controller.py", line 95, in __initialise_key_handler
keyboard.add_hotkey("enter", self.listener.stop, suppress=True)
File "/usr/local/lib/python3.6/dist-packages/keyboard-0.13.2-py3.6.egg/keyboard/__init__.py", line 637, in add_hotkey
_listener.start_if_necessary()
File "/usr/local/lib/python3.6/dist-packages/keyboard-0.13.2-py3.6.egg/keyboard/_generic.py", line 35, in start_if_necessary
self.init()
File "/usr/local/lib/python3.6/dist-packages/keyboard-0.13.2-py3.6.egg/keyboard/__init__.py", line 194, in init
_os_keyboard.init()
File "/usr/local/lib/python3.6/dist-packages/keyboard-0.13.2-py3.6.egg/keyboard/_nixkeyboard.py", line 113, in init
build_device()
File "/usr/local/lib/python3.6/dist-packages/keyboard-0.13.2-py3.6.egg/keyboard/_nixkeyboard.py", line 110, in build_device
device = aggregate_devices('kbd')
File "/usr/local/lib/python3.6/dist-packages/keyboard-0.13.2-py3.6.egg/keyboard/_nixcommon.py", line 168, in aggregate_devices
assert fake_device
AssertionError
If anybody knows how to fix this or has a good work-around. Please let me know.

Resources