This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhendrikse
Recipients rhendrikse
Date 2016-07-12.09:14:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1468314884.39.0.604549697605.issue27493@psf.upfronthosting.co.za>
In-reply-to
Content
No idea if I should be reporting this here, but it came with the default installation, so here goes:

On a mac, I supplied a basicConfig object to the logging class that contains a PosixPath instance for the "filename" attribute.
consequently, it fails with the error message "'PosixPath' object has no attribute 'startswith'" without specifying where the issue lies.

offending value:
STATUSLOG_PATH   = Path('~/logFiles/Reseller/').expanduser()

Relevant part of the traceback (which didn't print by default):
  File "/Users/rhendrikse/Documents/PythonScripts/Reseller/Reseller/application/application.py", line 41, in __setup_logger
    logging.basicConfig(level=logging.DEBUG, format=DEFS.RUNLOG_FORMAT, filename=DEFS.RUNLOG_PATH)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/logging/__init__.py", line 1744, in basicConfig
    h = FileHandler(filename, mode)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/logging/__init__.py", line 998, in __init__
    self.baseFilename = os.path.abspath(filename)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/posixpath.py", line 357, in abspath
    if not isabs(path):
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/posixpath.py", line 64, in isabs
    return s.startswith(sep)
AttributeError: 'PosixPath' object has no attribute 'startswith'
History
Date User Action Args
2016-07-12 09:14:44rhendriksesetrecipients: + rhendrikse
2016-07-12 09:14:44rhendriksesetmessageid: <1468314884.39.0.604549697605.issue27493@psf.upfronthosting.co.za>
2016-07-12 09:14:44rhendrikselinkissue27493 messages
2016-07-12 09:14:43rhendriksecreate