question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Install mqttwarn 0.23.1: TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

See original GitHub issue

Using standard install of mqttwarn on debian 10. Did update as imagebash64 via pushover gave error messages. Update now gives error: both on debian 10 install as well as on docker.

Error:

Traceback (most recent call last):
  File "/usr/local/bin/mqttwarn", line 8, in <module>
    sys.exit(run())
  File "/usr/local/lib/python3.9/site-packages/mqttwarn/commands.py", line 76, in run
    run_mqttwarn()
  File "/usr/local/lib/python3.9/site-packages/mqttwarn/commands.py", line 98, in run_mqttwarn
    config = load_configuration(name=scriptname)
  File "/usr/local/lib/python3.9/site-packages/mqttwarn/configuration.py", line 191, in load_configuration
    return Config(configfile, defaults=defaults)
  File "/usr/local/lib/python3.9/site-packages/mqttwarn/configuration.py", line 88, in __init__
    if os.path.isfile(self.functions):
  File "/usr/local/lib/python3.9/genericpath.py", line 30, in isfile
    st = os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
aerrow5commented, Jun 10, 2021

Apologize for not being complete. It was indeed the solution:

; logging
logformat = '%(asctime)-15s %(levelname)-5s [%(module)s] %(message)s'
logfile   = '/var/log/mqttwarn/mqttwarn.log'

; one of: CRITICAL, DEBUG, ERROR, INFO, WARN
loglevel  = DEBUG

; path to file containing self-defined functions for formatmap and datamap
; functions = 'samplefuncs.py'

; name the service providers you will be using.
launch    = file, log, pushover

I disabled the functions resulting in an error. In the older version (April '21) it worked, that’s why I expected another issue. Thanks a lot for the input.

0reactions
amotlcommented, Jun 10, 2021

In the older version (April '21) it worked.

Thanks a stack for your report, leading to the mitigation of this regression.

Read more comments on GitHub >

github_iconTop Results From Across the Web

stat: path should be string, bytes, os.PathLike or integer, not ...
TypeError : stat: path should be string, bytes, os.PathLike or integer, not image. i am trying to give the path of the image...
Read more >
stat: path should be string, bytes, os.PathLike or integer, not ...
Cannot debug poetry error: TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType #987.
Read more >
scandir: path should be string, bytes, os.PathLike or None, not ...
When using a FilePathField as follows def chunk_path(): return os.path.join(settings.MEDIA_ROOT, 'footage/chunks') file = models.
Read more >
Backup Error: TypeError: stat: path should be string, bytes, os ...
PathLike or integer, not NoneType. Is anyone getting this error on Dropbox or Amazon S3? This started two days ago and i can't...
Read more >
Issue #7469: ipa-replica-prepare fail with "stat: path should be ...
Host.master.cmd32] stat: path should be string, bytes, os.PathLike or integer, not NoneType [ipatests.pytest_plugins.integration.host.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found