multiple test failures due to permissions #35

Closed
opened 2022-07-05 01:38:41 +02:00 by blacklight · 0 comments
Owner

Hi, I'm new to Platypush and can't get it working after following your Hackernoon article step-by-step (How to Transform a Raspberry pi into a universal zigbee and z-wave bridge.) After hitting problems with the pip3 install of Platypush, I also downloaded and installed the source code. When I attempt to run your tests, I get permission errors, so suspect it's something pretty basic. Any suggestions?

Here are the permission errors:

pi@raspberrypi:~/platypush $ python3 -m tests
============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-6.2.3, py-1.10.0, pluggy-0.13.1
rootdir: /home/pi/platypush
collected 9 items

tests/test_cron.py E [ 11%]
tests/test_event_parse.py E [ 22%]
tests/test_http.py EEEEE [ 77%]
tests/test_procedure.py EE [100%]

==================================== ERRORS ====================================
____________________ ERROR at setup of test_cron_execution _____________________

@pytest.fixture(scope='session', autouse=True)
def app():
    logging.info('Starting Platypush test service')
  Config.init(config_file)

tests/conftest.py:33:


platypush/config/init.py:377: in init
_default_config_instance = Config(cfgfile)
platypush/config/init.py:84: in init
os.makedirs(self._config['dashboards_dir'], mode=0o755, exist_ok=True)


name = '/home/pi/platypush/tests/etc/dashboards', mode = 493, exist_ok = True

def makedirs(name, mode=0o777, exist_ok=False):
    """makedirs(name [, mode=0o777][, exist_ok=False])

    Super-mkdir; create a leaf directory and all intermediate ones.  Works like
    mkdir, except that any intermediate path segment (not just the rightmost)
    will be created if it does not exist. If the target directory already
    exists, raise an OSError if exist_ok is False. Otherwise no exception is
    raised.  This is recursive.

    """
    head, tail = path.split(name)
    if not tail:
        head, tail = path.split(head)
    if head and tail and not path.exists(head):
        try:
            makedirs(head, exist_ok=exist_ok)
        except FileExistsError:
            # Defeats race condition when another thread created the path
            pass
        cdir = curdir
        if isinstance(tail, bytes):
            cdir = bytes(curdir, 'ASCII')
        if tail == cdir:           # xxx/newdir/. exists if xxx/newdir exists
            return
    try:
      mkdir(name, mode)

E PermissionError: [Errno 13] Permission denied: '/home/pi/platypush/tests/etc/dashboards'

/usr/lib/python3.7/os.py:221: PermissionError
---------------------------- Captured stdout setup -----------------------------
INFO:root:Starting Platypush test service
------------------------------ Captured log setup ------------------------------
INFO root:conftest.py:31 Starting Platypush test service
______________________ ERROR at setup of test_event_parse ______________________

@pytest.fixture(scope='session', autouse=True)
def app():
    logging.info('Starting Platypush test service')
  Config.init(config_file)

tests/conftest.py:33:


platypush/config/init.py:377: in init
_default_config_instance = Config(cfgfile)
platypush/config/init.py:84: in init
os.makedirs(self._config['dashboards_dir'], mode=0o755, exist_ok=True)


name = '/home/pi/platypush/tests/etc/dashboards', mode = 493, exist_ok = True

def makedirs(name, mode=0o777, exist_ok=False):
    """makedirs(name [, mode=0o777][, exist_ok=False])

    Super-mkdir; create a leaf directory and all intermediate ones.  Works like
    mkdir, except that any intermediate path segment (not just the rightmost)
    will be created if it does not exist. If the target directory already
    exists, raise an OSError if exist_ok is False. Otherwise no exception is
    raised.  This is recursive.

    """
    head, tail = path.split(name)
    if not tail:
        head, tail = path.split(head)
    if head and tail and not path.exists(head):
        try:
            makedirs(head, exist_ok=exist_ok)
        except FileExistsError:
            # Defeats race condition when another thread created the path
            pass
        cdir = curdir
        if isinstance(tail, bytes):
            cdir = bytes(curdir, 'ASCII')
        if tail == cdir:           # xxx/newdir/. exists if xxx/newdir exists
            return
    try:
      mkdir(name, mode)

E PermissionError: [Errno 13] Permission denied: '/home/pi/platypush/tests/etc/dashboards'

/usr/lib/python3.7/os.py:221: PermissionError
___________ ERROR at setup of test_request_with_no_registered_users ____________

@pytest.fixture(scope='session', autouse=True)
def app():
    logging.info('Starting Platypush test service')
  Config.init(config_file)

tests/conftest.py:33:


platypush/config/init.py:377: in init
_default_config_instance = Config(cfgfile)
platypush/config/init.py:84: in init
os.makedirs(self._config['dashboards_dir'], mode=0o755, exist_ok=True)


name = '/home/pi/platypush/tests/etc/dashboards', mode = 493, exist_ok = True

def makedirs(name, mode=0o777, exist_ok=False):
    """makedirs(name [, mode=0o777][, exist_ok=False])

    Super-mkdir; create a leaf directory and all intermediate ones.  Works like
    mkdir, except that any intermediate path segment (not just the rightmost)
    will be created if it does not exist. If the target directory already
    exists, raise an OSError if exist_ok is False. Otherwise no exception is
    raised.  This is recursive.

    """
    head, tail = path.split(name)
    if not tail:
        head, tail = path.split(head)
    if head and tail and not path.exists(head):
        try:
            makedirs(head, exist_ok=exist_ok)
        except FileExistsError:
            # Defeats race condition when another thread created the path
            pass
        cdir = curdir
        if isinstance(tail, bytes):
            cdir = bytes(curdir, 'ASCII')
        if tail == cdir:           # xxx/newdir/. exists if xxx/newdir exists
            return
    try:
      mkdir(name, mode)

E PermissionError: [Errno 13] Permission denied: '/home/pi/platypush/tests/etc/dashboards'

/usr/lib/python3.7/os.py:221: PermissionError
________________ ERROR at setup of test_first_user_registration ________________

@pytest.fixture(scope='session', autouse=True)
def app():
    logging.info('Starting Platypush test service')
  Config.init(config_file)

tests/conftest.py:33:


platypush/config/init.py:377: in init
_default_config_instance = Config(cfgfile)
platypush/config/init.py:84: in init
os.makedirs(self._config['dashboards_dir'], mode=0o755, exist_ok=True)


name = '/home/pi/platypush/tests/etc/dashboards', mode = 493, exist_ok = True

def makedirs(name, mode=0o777, exist_ok=False):
    """makedirs(name [, mode=0o777][, exist_ok=False])

    Super-mkdir; create a leaf directory and all intermediate ones.  Works like
    mkdir, except that any intermediate path segment (not just the rightmost)
    will be created if it does not exist. If the target directory already
    exists, raise an OSError if exist_ok is False. Otherwise no exception is
    raised.  This is recursive.

    """
    head, tail = path.split(name)
    if not tail:
        head, tail = path.split(head)
    if head and tail and not path.exists(head):
        try:
            makedirs(head, exist_ok=exist_ok)
        except FileExistsError:
            # Defeats race condition when another thread created the path
            pass
        cdir = curdir
        if isinstance(tail, bytes):
            cdir = bytes(curdir, 'ASCII')
        if tail == cdir:           # xxx/newdir/. exists if xxx/newdir exists
            return
    try:
      mkdir(name, mode)

E PermissionError: [Errno 13] Permission denied: '/home/pi/platypush/tests/etc/dashboards'

/usr/lib/python3.7/os.py:221: PermissionError
_______ ERROR at setup of test_unauthorized_request_with_registered_user _______

@pytest.fixture(scope='session', autouse=True)
def app():
    logging.info('Starting Platypush test service')
  Config.init(config_file)

tests/conftest.py:33:


platypush/config/init.py:377: in init
_default_config_instance = Config(cfgfile)
platypush/config/init.py:84: in init
os.makedirs(self._config['dashboards_dir'], mode=0o755, exist_ok=True)


name = '/home/pi/platypush/tests/etc/dashboards', mode = 493, exist_ok = True

def makedirs(name, mode=0o777, exist_ok=False):
    """makedirs(name [, mode=0o777][, exist_ok=False])

    Super-mkdir; create a leaf directory and all intermediate ones.  Works like
    mkdir, except that any intermediate path segment (not just the rightmost)
    will be created if it does not exist. If the target directory already
    exists, raise an OSError if exist_ok is False. Otherwise no exception is
    raised.  This is recursive.

    """
    head, tail = path.split(name)
    if not tail:
        head, tail = path.split(head)
    if head and tail and not path.exists(head):
        try:
            makedirs(head, exist_ok=exist_ok)
        except FileExistsError:
            # Defeats race condition when another thread created the path
            pass
        cdir = curdir
        if isinstance(tail, bytes):
            cdir = bytes(curdir, 'ASCII')
        if tail == cdir:           # xxx/newdir/. exists if xxx/newdir exists
            return
    try:
      mkdir(name, mode)

E PermissionError: [Errno 13] Permission denied: '/home/pi/platypush/tests/etc/dashboards'

/usr/lib/python3.7/os.py:221: PermissionError
________ ERROR at setup of test_authorized_request_with_registered_user ________

@pytest.fixture(scope='session', autouse=True)
def app():
    logging.info('Starting Platypush test service')
  Config.init(config_file)

tests/conftest.py:33:


platypush/config/init.py:377: in init
_default_config_instance = Config(cfgfile)
platypush/config/init.py:84: in init
os.makedirs(self._config['dashboards_dir'], mode=0o755, exist_ok=True)


name = '/home/pi/platypush/tests/etc/dashboards', mode = 493, exist_ok = True

def makedirs(name, mode=0o777, exist_ok=False):
    """makedirs(name [, mode=0o777][, exist_ok=False])

    Super-mkdir; create a leaf directory and all intermediate ones.  Works like
    mkdir, except that any intermediate path segment (not just the rightmost)
    will be created if it does not exist. If the target directory already
    exists, raise an OSError if exist_ok is False. Otherwise no exception is
    raised.  This is recursive.

    """
    head, tail = path.split(name)
    if not tail:
        head, tail = path.split(head)
    if head and tail and not path.exists(head):
        try:
            makedirs(head, exist_ok=exist_ok)
        except FileExistsError:
            # Defeats race condition when another thread created the path
            pass
        cdir = curdir
        if isinstance(tail, bytes):
            cdir = bytes(curdir, 'ASCII')
        if tail == cdir:           # xxx/newdir/. exists if xxx/newdir exists
            return
    try:
      mkdir(name, mode)

E PermissionError: [Errno 13] Permission denied: '/home/pi/platypush/tests/etc/dashboards'

/usr/lib/python3.7/os.py:221: PermissionError
____________ ERROR at setup of test_request_with_wrong_credentials _____________

@pytest.fixture(scope='session', autouse=True)
def app():
    logging.info('Starting Platypush test service')
  Config.init(config_file)

tests/conftest.py:33:


platypush/config/init.py:377: in init
_default_config_instance = Config(cfgfile)
platypush/config/init.py:84: in init
os.makedirs(self._config['dashboards_dir'], mode=0o755, exist_ok=True)


name = '/home/pi/platypush/tests/etc/dashboards', mode = 493, exist_ok = True

def makedirs(name, mode=0o777, exist_ok=False):
    """makedirs(name [, mode=0o777][, exist_ok=False])

    Super-mkdir; create a leaf directory and all intermediate ones.  Works like
    mkdir, except that any intermediate path segment (not just the rightmost)
    will be created if it does not exist. If the target directory already
    exists, raise an OSError if exist_ok is False. Otherwise no exception is
    raised.  This is recursive.

    """
    head, tail = path.split(name)
    if not tail:
        head, tail = path.split(head)
    if head and tail and not path.exists(head):
        try:
            makedirs(head, exist_ok=exist_ok)
        except FileExistsError:
            # Defeats race condition when another thread created the path
            pass
        cdir = curdir
        if isinstance(tail, bytes):
            cdir = bytes(curdir, 'ASCII')
        if tail == cdir:           # xxx/newdir/. exists if xxx/newdir exists
            return
    try:
      mkdir(name, mode)

E PermissionError: [Errno 13] Permission denied: '/home/pi/platypush/tests/etc/dashboards'

/usr/lib/python3.7/os.py:221: PermissionError
____________________ ERROR at setup of test_procedure_call _____________________

@pytest.fixture(scope='session', autouse=True)
def app():
    logging.info('Starting Platypush test service')
  Config.init(config_file)

tests/conftest.py:33:


platypush/config/init.py:377: in init
_default_config_instance = Config(cfgfile)
platypush/config/init.py:84: in init
os.makedirs(self._config['dashboards_dir'], mode=0o755, exist_ok=True)


name = '/home/pi/platypush/tests/etc/dashboards', mode = 493, exist_ok = True

def makedirs(name, mode=0o777, exist_ok=False):
    """makedirs(name [, mode=0o777][, exist_ok=False])

    Super-mkdir; create a leaf directory and all intermediate ones.  Works like
    mkdir, except that any intermediate path segment (not just the rightmost)
    will be created if it does not exist. If the target directory already
    exists, raise an OSError if exist_ok is False. Otherwise no exception is
    raised.  This is recursive.

    """
    head, tail = path.split(name)
    if not tail:
        head, tail = path.split(head)
    if head and tail and not path.exists(head):
        try:
            makedirs(head, exist_ok=exist_ok)
        except FileExistsError:
            # Defeats race condition when another thread created the path
            pass
        cdir = curdir
        if isinstance(tail, bytes):
            cdir = bytes(curdir, 'ASCII')
        if tail == cdir:           # xxx/newdir/. exists if xxx/newdir exists
            return
    try:
      mkdir(name, mode)

E PermissionError: [Errno 13] Permission denied: '/home/pi/platypush/tests/etc/dashboards'

/usr/lib/python3.7/os.py:221: PermissionError
_________________ ERROR at setup of test_procedure_from_event __________________

@pytest.fixture(scope='session', autouse=True)
def app():
    logging.info('Starting Platypush test service')
  Config.init(config_file)

tests/conftest.py:33:


platypush/config/init.py:377: in init
_default_config_instance = Config(cfgfile)
platypush/config/init.py:84: in init
os.makedirs(self._config['dashboards_dir'], mode=0o755, exist_ok=True)


name = '/home/pi/platypush/tests/etc/dashboards', mode = 493, exist_ok = True

def makedirs(name, mode=0o777, exist_ok=False):
    """makedirs(name [, mode=0o777][, exist_ok=False])

    Super-mkdir; create a leaf directory and all intermediate ones.  Works like
    mkdir, except that any intermediate path segment (not just the rightmost)
    will be created if it does not exist. If the target directory already
    exists, raise an OSError if exist_ok is False. Otherwise no exception is
    raised.  This is recursive.

    """
    head, tail = path.split(name)
    if not tail:
        head, tail = path.split(head)
    if head and tail and not path.exists(head):
        try:
            makedirs(head, exist_ok=exist_ok)
        except FileExistsError:
            # Defeats race condition when another thread created the path
            pass
        cdir = curdir
        if isinstance(tail, bytes):
            cdir = bytes(curdir, 'ASCII')
        if tail == cdir:           # xxx/newdir/. exists if xxx/newdir exists
            return
    try:
      mkdir(name, mode)

E PermissionError: [Errno 13] Permission denied: '/home/pi/platypush/tests/etc/dashboards'

/usr/lib/python3.7/os.py:221: PermissionError
=============================== warnings summary ===============================
../.local/lib/python3.7/site-packages/_pytest/cacheprovider.py:428
/home/pi/.local/lib/python3.7/site-packages/_pytest/cacheprovider.py:428: PytestCacheWarning: could not create cache path /home/pi/platypush/.pytest_cache/v/cache/nodeids
config.cache.set("cache/nodeids", sorted(self.cached_nodeids))

../.local/lib/python3.7/site-packages/_pytest/cacheprovider.py:382
/home/pi/.local/lib/python3.7/site-packages/_pytest/cacheprovider.py:382: PytestCacheWarning: could not create cache path /home/pi/platypush/.pytest_cache/v/cache/lastfailed
config.cache.set("cache/lastfailed", self.lastfailed)

../.local/lib/python3.7/site-packages/_pytest/stepwise.py:49
/home/pi/.local/lib/python3.7/site-packages/_pytest/stepwise.py:49: PytestCacheWarning: could not create cache path /home/pi/platypush/.pytest_cache/v/cache/stepwise
session.config.cache.set(STEPWISE_CACHE_DIR, [])

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
ERROR tests/test_cron.py::test_cron_execution - PermissionError: [Errno 13] P...
ERROR tests/test_event_parse.py::test_event_parse - PermissionError: [Errno 1...
ERROR tests/test_http.py::test_request_with_no_registered_users - PermissionE...
ERROR tests/test_http.py::test_first_user_registration - PermissionError: [Er...
ERROR tests/test_http.py::test_unauthorized_request_with_registered_user - Pe...
ERROR tests/test_http.py::test_authorized_request_with_registered_user - Perm...
ERROR tests/test_http.py::test_request_with_wrong_credentials - PermissionErr...
ERROR tests/test_procedure.py::test_procedure_call - PermissionError: [Errno ...
ERROR tests/test_procedure.py::test_procedure_from_event - PermissionError: [...
======================== 3 warnings, 9 errors in 18.65s ========================

Hi, I'm new to Platypush and can't get it working after following your Hackernoon article step-by-step (How to Transform a Raspberry pi into a universal zigbee and z-wave bridge.) After hitting problems with the pip3 install of Platypush, I also downloaded and installed the source code. When I attempt to run your tests, I get permission errors, so suspect it's something pretty basic. Any suggestions? Here are the permission errors: pi@raspberrypi:~/platypush $ python3 -m tests ============================= test session starts ============================== platform linux -- Python 3.7.3, pytest-6.2.3, py-1.10.0, pluggy-0.13.1 rootdir: /home/pi/platypush collected 9 items tests/test_cron.py E [ 11%] tests/test_event_parse.py E [ 22%] tests/test_http.py EEEEE [ 77%] tests/test_procedure.py EE [100%] ==================================== ERRORS ==================================== ____________________ ERROR at setup of test_cron_execution _____________________ @pytest.fixture(scope='session', autouse=True) def app(): logging.info('Starting Platypush test service') > Config.init(config_file) tests/conftest.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ platypush/config/__init__.py:377: in init _default_config_instance = Config(cfgfile) platypush/config/__init__.py:84: in __init__ os.makedirs(self._config['dashboards_dir'], mode=0o755, exist_ok=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = '/home/pi/platypush/tests/etc/dashboards', mode = 493, exist_ok = True def makedirs(name, mode=0o777, exist_ok=False): """makedirs(name [, mode=0o777][, exist_ok=False]) Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except that any intermediate path segment (not just the rightmost) will be created if it does not exist. If the target directory already exists, raise an OSError if exist_ok is False. Otherwise no exception is raised. This is recursive. """ head, tail = path.split(name) if not tail: head, tail = path.split(head) if head and tail and not path.exists(head): try: makedirs(head, exist_ok=exist_ok) except FileExistsError: # Defeats race condition when another thread created the path pass cdir = curdir if isinstance(tail, bytes): cdir = bytes(curdir, 'ASCII') if tail == cdir: # xxx/newdir/. exists if xxx/newdir exists return try: > mkdir(name, mode) E PermissionError: [Errno 13] Permission denied: '/home/pi/platypush/tests/etc/dashboards' /usr/lib/python3.7/os.py:221: PermissionError ---------------------------- Captured stdout setup ----------------------------- INFO:root:Starting Platypush test service ------------------------------ Captured log setup ------------------------------ INFO root:conftest.py:31 Starting Platypush test service ______________________ ERROR at setup of test_event_parse ______________________ @pytest.fixture(scope='session', autouse=True) def app(): logging.info('Starting Platypush test service') > Config.init(config_file) tests/conftest.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ platypush/config/__init__.py:377: in init _default_config_instance = Config(cfgfile) platypush/config/__init__.py:84: in __init__ os.makedirs(self._config['dashboards_dir'], mode=0o755, exist_ok=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = '/home/pi/platypush/tests/etc/dashboards', mode = 493, exist_ok = True def makedirs(name, mode=0o777, exist_ok=False): """makedirs(name [, mode=0o777][, exist_ok=False]) Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except that any intermediate path segment (not just the rightmost) will be created if it does not exist. If the target directory already exists, raise an OSError if exist_ok is False. Otherwise no exception is raised. This is recursive. """ head, tail = path.split(name) if not tail: head, tail = path.split(head) if head and tail and not path.exists(head): try: makedirs(head, exist_ok=exist_ok) except FileExistsError: # Defeats race condition when another thread created the path pass cdir = curdir if isinstance(tail, bytes): cdir = bytes(curdir, 'ASCII') if tail == cdir: # xxx/newdir/. exists if xxx/newdir exists return try: > mkdir(name, mode) E PermissionError: [Errno 13] Permission denied: '/home/pi/platypush/tests/etc/dashboards' /usr/lib/python3.7/os.py:221: PermissionError ___________ ERROR at setup of test_request_with_no_registered_users ____________ @pytest.fixture(scope='session', autouse=True) def app(): logging.info('Starting Platypush test service') > Config.init(config_file) tests/conftest.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ platypush/config/__init__.py:377: in init _default_config_instance = Config(cfgfile) platypush/config/__init__.py:84: in __init__ os.makedirs(self._config['dashboards_dir'], mode=0o755, exist_ok=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = '/home/pi/platypush/tests/etc/dashboards', mode = 493, exist_ok = True def makedirs(name, mode=0o777, exist_ok=False): """makedirs(name [, mode=0o777][, exist_ok=False]) Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except that any intermediate path segment (not just the rightmost) will be created if it does not exist. If the target directory already exists, raise an OSError if exist_ok is False. Otherwise no exception is raised. This is recursive. """ head, tail = path.split(name) if not tail: head, tail = path.split(head) if head and tail and not path.exists(head): try: makedirs(head, exist_ok=exist_ok) except FileExistsError: # Defeats race condition when another thread created the path pass cdir = curdir if isinstance(tail, bytes): cdir = bytes(curdir, 'ASCII') if tail == cdir: # xxx/newdir/. exists if xxx/newdir exists return try: > mkdir(name, mode) E PermissionError: [Errno 13] Permission denied: '/home/pi/platypush/tests/etc/dashboards' /usr/lib/python3.7/os.py:221: PermissionError ________________ ERROR at setup of test_first_user_registration ________________ @pytest.fixture(scope='session', autouse=True) def app(): logging.info('Starting Platypush test service') > Config.init(config_file) tests/conftest.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ platypush/config/__init__.py:377: in init _default_config_instance = Config(cfgfile) platypush/config/__init__.py:84: in __init__ os.makedirs(self._config['dashboards_dir'], mode=0o755, exist_ok=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = '/home/pi/platypush/tests/etc/dashboards', mode = 493, exist_ok = True def makedirs(name, mode=0o777, exist_ok=False): """makedirs(name [, mode=0o777][, exist_ok=False]) Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except that any intermediate path segment (not just the rightmost) will be created if it does not exist. If the target directory already exists, raise an OSError if exist_ok is False. Otherwise no exception is raised. This is recursive. """ head, tail = path.split(name) if not tail: head, tail = path.split(head) if head and tail and not path.exists(head): try: makedirs(head, exist_ok=exist_ok) except FileExistsError: # Defeats race condition when another thread created the path pass cdir = curdir if isinstance(tail, bytes): cdir = bytes(curdir, 'ASCII') if tail == cdir: # xxx/newdir/. exists if xxx/newdir exists return try: > mkdir(name, mode) E PermissionError: [Errno 13] Permission denied: '/home/pi/platypush/tests/etc/dashboards' /usr/lib/python3.7/os.py:221: PermissionError _______ ERROR at setup of test_unauthorized_request_with_registered_user _______ @pytest.fixture(scope='session', autouse=True) def app(): logging.info('Starting Platypush test service') > Config.init(config_file) tests/conftest.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ platypush/config/__init__.py:377: in init _default_config_instance = Config(cfgfile) platypush/config/__init__.py:84: in __init__ os.makedirs(self._config['dashboards_dir'], mode=0o755, exist_ok=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = '/home/pi/platypush/tests/etc/dashboards', mode = 493, exist_ok = True def makedirs(name, mode=0o777, exist_ok=False): """makedirs(name [, mode=0o777][, exist_ok=False]) Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except that any intermediate path segment (not just the rightmost) will be created if it does not exist. If the target directory already exists, raise an OSError if exist_ok is False. Otherwise no exception is raised. This is recursive. """ head, tail = path.split(name) if not tail: head, tail = path.split(head) if head and tail and not path.exists(head): try: makedirs(head, exist_ok=exist_ok) except FileExistsError: # Defeats race condition when another thread created the path pass cdir = curdir if isinstance(tail, bytes): cdir = bytes(curdir, 'ASCII') if tail == cdir: # xxx/newdir/. exists if xxx/newdir exists return try: > mkdir(name, mode) E PermissionError: [Errno 13] Permission denied: '/home/pi/platypush/tests/etc/dashboards' /usr/lib/python3.7/os.py:221: PermissionError ________ ERROR at setup of test_authorized_request_with_registered_user ________ @pytest.fixture(scope='session', autouse=True) def app(): logging.info('Starting Platypush test service') > Config.init(config_file) tests/conftest.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ platypush/config/__init__.py:377: in init _default_config_instance = Config(cfgfile) platypush/config/__init__.py:84: in __init__ os.makedirs(self._config['dashboards_dir'], mode=0o755, exist_ok=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = '/home/pi/platypush/tests/etc/dashboards', mode = 493, exist_ok = True def makedirs(name, mode=0o777, exist_ok=False): """makedirs(name [, mode=0o777][, exist_ok=False]) Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except that any intermediate path segment (not just the rightmost) will be created if it does not exist. If the target directory already exists, raise an OSError if exist_ok is False. Otherwise no exception is raised. This is recursive. """ head, tail = path.split(name) if not tail: head, tail = path.split(head) if head and tail and not path.exists(head): try: makedirs(head, exist_ok=exist_ok) except FileExistsError: # Defeats race condition when another thread created the path pass cdir = curdir if isinstance(tail, bytes): cdir = bytes(curdir, 'ASCII') if tail == cdir: # xxx/newdir/. exists if xxx/newdir exists return try: > mkdir(name, mode) E PermissionError: [Errno 13] Permission denied: '/home/pi/platypush/tests/etc/dashboards' /usr/lib/python3.7/os.py:221: PermissionError ____________ ERROR at setup of test_request_with_wrong_credentials _____________ @pytest.fixture(scope='session', autouse=True) def app(): logging.info('Starting Platypush test service') > Config.init(config_file) tests/conftest.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ platypush/config/__init__.py:377: in init _default_config_instance = Config(cfgfile) platypush/config/__init__.py:84: in __init__ os.makedirs(self._config['dashboards_dir'], mode=0o755, exist_ok=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = '/home/pi/platypush/tests/etc/dashboards', mode = 493, exist_ok = True def makedirs(name, mode=0o777, exist_ok=False): """makedirs(name [, mode=0o777][, exist_ok=False]) Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except that any intermediate path segment (not just the rightmost) will be created if it does not exist. If the target directory already exists, raise an OSError if exist_ok is False. Otherwise no exception is raised. This is recursive. """ head, tail = path.split(name) if not tail: head, tail = path.split(head) if head and tail and not path.exists(head): try: makedirs(head, exist_ok=exist_ok) except FileExistsError: # Defeats race condition when another thread created the path pass cdir = curdir if isinstance(tail, bytes): cdir = bytes(curdir, 'ASCII') if tail == cdir: # xxx/newdir/. exists if xxx/newdir exists return try: > mkdir(name, mode) E PermissionError: [Errno 13] Permission denied: '/home/pi/platypush/tests/etc/dashboards' /usr/lib/python3.7/os.py:221: PermissionError ____________________ ERROR at setup of test_procedure_call _____________________ @pytest.fixture(scope='session', autouse=True) def app(): logging.info('Starting Platypush test service') > Config.init(config_file) tests/conftest.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ platypush/config/__init__.py:377: in init _default_config_instance = Config(cfgfile) platypush/config/__init__.py:84: in __init__ os.makedirs(self._config['dashboards_dir'], mode=0o755, exist_ok=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = '/home/pi/platypush/tests/etc/dashboards', mode = 493, exist_ok = True def makedirs(name, mode=0o777, exist_ok=False): """makedirs(name [, mode=0o777][, exist_ok=False]) Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except that any intermediate path segment (not just the rightmost) will be created if it does not exist. If the target directory already exists, raise an OSError if exist_ok is False. Otherwise no exception is raised. This is recursive. """ head, tail = path.split(name) if not tail: head, tail = path.split(head) if head and tail and not path.exists(head): try: makedirs(head, exist_ok=exist_ok) except FileExistsError: # Defeats race condition when another thread created the path pass cdir = curdir if isinstance(tail, bytes): cdir = bytes(curdir, 'ASCII') if tail == cdir: # xxx/newdir/. exists if xxx/newdir exists return try: > mkdir(name, mode) E PermissionError: [Errno 13] Permission denied: '/home/pi/platypush/tests/etc/dashboards' /usr/lib/python3.7/os.py:221: PermissionError _________________ ERROR at setup of test_procedure_from_event __________________ @pytest.fixture(scope='session', autouse=True) def app(): logging.info('Starting Platypush test service') > Config.init(config_file) tests/conftest.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ platypush/config/__init__.py:377: in init _default_config_instance = Config(cfgfile) platypush/config/__init__.py:84: in __init__ os.makedirs(self._config['dashboards_dir'], mode=0o755, exist_ok=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = '/home/pi/platypush/tests/etc/dashboards', mode = 493, exist_ok = True def makedirs(name, mode=0o777, exist_ok=False): """makedirs(name [, mode=0o777][, exist_ok=False]) Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except that any intermediate path segment (not just the rightmost) will be created if it does not exist. If the target directory already exists, raise an OSError if exist_ok is False. Otherwise no exception is raised. This is recursive. """ head, tail = path.split(name) if not tail: head, tail = path.split(head) if head and tail and not path.exists(head): try: makedirs(head, exist_ok=exist_ok) except FileExistsError: # Defeats race condition when another thread created the path pass cdir = curdir if isinstance(tail, bytes): cdir = bytes(curdir, 'ASCII') if tail == cdir: # xxx/newdir/. exists if xxx/newdir exists return try: > mkdir(name, mode) E PermissionError: [Errno 13] Permission denied: '/home/pi/platypush/tests/etc/dashboards' /usr/lib/python3.7/os.py:221: PermissionError =============================== warnings summary =============================== ../.local/lib/python3.7/site-packages/_pytest/cacheprovider.py:428 /home/pi/.local/lib/python3.7/site-packages/_pytest/cacheprovider.py:428: PytestCacheWarning: could not create cache path /home/pi/platypush/.pytest_cache/v/cache/nodeids config.cache.set("cache/nodeids", sorted(self.cached_nodeids)) ../.local/lib/python3.7/site-packages/_pytest/cacheprovider.py:382 /home/pi/.local/lib/python3.7/site-packages/_pytest/cacheprovider.py:382: PytestCacheWarning: could not create cache path /home/pi/platypush/.pytest_cache/v/cache/lastfailed config.cache.set("cache/lastfailed", self.lastfailed) ../.local/lib/python3.7/site-packages/_pytest/stepwise.py:49 /home/pi/.local/lib/python3.7/site-packages/_pytest/stepwise.py:49: PytestCacheWarning: could not create cache path /home/pi/platypush/.pytest_cache/v/cache/stepwise session.config.cache.set(STEPWISE_CACHE_DIR, []) -- Docs: https://docs.pytest.org/en/stable/warnings.html =========================== short test summary info ============================ ERROR tests/test_cron.py::test_cron_execution - PermissionError: [Errno 13] P... ERROR tests/test_event_parse.py::test_event_parse - PermissionError: [Errno 1... ERROR tests/test_http.py::test_request_with_no_registered_users - PermissionE... ERROR tests/test_http.py::test_first_user_registration - PermissionError: [Er... ERROR tests/test_http.py::test_unauthorized_request_with_registered_user - Pe... ERROR tests/test_http.py::test_authorized_request_with_registered_user - Perm... ERROR tests/test_http.py::test_request_with_wrong_credentials - PermissionErr... ERROR tests/test_procedure.py::test_procedure_call - PermissionError: [Errno ... ERROR tests/test_procedure.py::test_procedure_from_event - PermissionError: [... ======================== 3 warnings, 9 errors in 18.65s ========================
blacklight added the
waiting user input
label 2022-07-05 01:38:41 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: platypush/platypush#35
No description provided.