[Beginner] need help to configure script python as a service

Hello,

I try to launch a service (python script) but it’s not working :

In service, i put python_scripts.Bridge_Jeedom_InfluxDB

Échec d’appel du service “python_scripts/Bridge_Jeedom_InfluxDB”. Unable to find service python_scripts/bridge_jeedom_influxdb

What I do :
add line
python_scripts
to my configuration.yaml

create directory python_scripts

root@Home-assistnat:/usr/share/hassio/homeassistant# ls -l
total 116972
-rw-r--r-- 1 root root         2 Feb 21 14:05 automations.yaml
drwxrwxrwx 2 root root      4096 Feb 28 15:21 config
-rw-r--r-- 1 root root      1752 Feb 28 14:32 configuration.yaml
drwxr-xr-x 3 root root      4096 Feb 24 10:23 custom_components
drwxr-xr-x 2 root root      4096 Feb 21 14:05 deps
-rw-r--r-- 1 root root         0 Feb 21 14:05 groups.yaml
-rw-r--r-- 1 root root      4471 Feb 28 15:20 home-assistant.log
-rw-r--r-- 1 root root 119631872 Feb 28 15:24 home-assistant_v2.db
-rw-r--r-- 1 root root     32768 Feb 28 15:24 home-assistant_v2.db-shm
-rw-r--r-- 1 root root     49472 Feb 28 15:24 home-assistant_v2.db-wal
drwxrwxrwx 2 root root      4096 Feb 28 13:53 python_scripts
-rw-r--r-- 1 root root         0 Feb 21 14:05 scenes.yaml
drwxr-xr-x 2 root root      4096 Feb 26 17:25 scriptjeedomm
-rw-r--r-- 1 root root         0 Feb 21 14:05 scripts.yaml
-rw-r--r-- 1 root root       157 Feb 21 14:05 secrets.yaml
drwxr-xr-x 5 root root      4096 Feb 24 12:50 themes
drwxr-xr-x 2 root root      4096 Feb 21 14:05 tts
-rw-r--r-- 1 root root        41 Feb 24 15:20 ui-lovelace.yaml
drwxr-xr-x 3 root root      4096 Feb 24 13:03 www

error on Home assistant :

Fri Feb 28 2020 16:22:11 GMT+0100 (heure normale d’Europe centrale)

Component error: python_scripts - Integration ‘python_scripts’ not found.

thank by advance

I modify python_scripts to python_scripts
to my configuration.yaml

Now, I have this error

Fri Feb 28 2020 16:40:41 GMT+0100 (heure normale d’Europe centrale)
[Errno 2] No such file or directory: '/config/python_scripts/bridge_jeedom_influxdb.py'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 134, in handle_call_service
    connection.context(msg),
  File "/usr/src/homeassistant/homeassistant/core.py", line 1226, in async_call
    await asyncio.shield(self._execute_service(handler, service_call))
  File "/usr/src/homeassistant/homeassistant/core.py", line 1253, in _execute_service
    await self._hass.async_add_executor_job(handler.func, service_call)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/python_script/__init__.py", line 96, in python_script_service_handler
    execute_script(hass, call.service, call.data)
  File "/usr/src/homeassistant/homeassistant/components/python_script/__init__.py", line 126, in execute_script
    with open(hass.config.path(FOLDER, sanitize_filename(filename))) as fil:
FileNotFoundError: [Errno 2] No such file or directory: '/config/python_scripts/bridge_jeedom_influxdb.py'

For information, when i run my script, it’s working :

Well, you should read the docs first.
They say that you should add python_script: to your configuration.yaml and that the script should be a *.py file.

I try to read the documentation but not sur to understand everything.

my scrypt is Python : bridge_jeedom_influxdb.py

Hi fcna
Did you find a solution?
I’m struggling with same issue

thanks

I have a similar problem and solved it with renaming the .py file to lower case.

I had a script MyScript.py

the error said:
No such file or directory: '/config/python_scripts/myscript.py'

I reanme it as myscript.py and it works!