DurgNomis-drol / mytoyota

Python client for Toyota Connected Services API
MIT License
77 stars 32 forks source link

my own fault -- simple_client_example.py => error | solved #299

Closed lhumb closed 9 months ago

lhumb commented 9 months ago

Describe the bug

simple_client_example.py => error

To Reproduce


$ python simple_client_example.py 

Traceback (most recent call last):
  File "/usr/lib/python3.11/logging/config.py", line 573, in configure
    handler = self.configure_handler(handlers[name])
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/logging/config.py", line 758, in configure_handler
    result = factory(**kwargs)
             ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/logging/__init__.py", line 1181, in __init__
    StreamHandler.__init__(self, self._open())
                                 ^^^^^^^^^^^^
  File "/usr/lib/python3.11/logging/__init__.py", line 1213, in _open
    return open_func(self.baseFilename, self.mode,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/oldroot/home/humbert/dokumente/photovoltaik-wallbox/mytoyota/.log'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/oldroot/home/humbert/dokumente/photovoltaik-wallbox/mytoyota/simple_client_example.py", line 8, in <module>
    import mytoyota.utils.logging.logging_config  # noqa # pylint: disable=unused-import
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/oldroot/home/humbert/dokumente/photovoltaik-wallbox/mytoyota/mytoyota/__init__.py", line 4, in <module>
    from mytoyota.client import MyT  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/oldroot/home/humbert/dokumente/photovoltaik-wallbox/mytoyota/mytoyota/client.py", line 14, in <module>
    import mytoyota.utils.logging.logging_config  # noqa # pylint: disable=unused-import
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/oldroot/home/humbert/dokumente/photovoltaik-wallbox/mytoyota/mytoyota/utils/logging/logging_config.py", line 13, in <module>
    logging.config.dictConfig(config_dict)
  File "/usr/lib/python3.11/logging/config.py", line 823, in dictConfig
    dictConfigClass(config).configure()
  File "/usr/lib/python3.11/logging/config.py", line 580, in configure
    raise ValueError('Unable to configure handler '
ValueError: Unable to configure handler 'file'
lhumb commented 9 months ago

ok I've got it … should give permission to write to .log file … after doing this, it runs without problems…

lhumb commented 9 months ago

not a bug but my misconfiguration