AttributeError: 'NoneType' object has no attribute 'strftime'

Bug #2004535 reported by Hatim
This bug report is a duplicate of:  Bug #2004650: pro status --all fails on 22.10. Edit Remove
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-advantage-tools (Ubuntu)
New
Undecided
Grant Orndorff

Bug Description

$ tail -f /var/log/ubuntu-advantage.log
    return func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 2016, in main
    return_value = args.action(args, cfg=cfg)
  File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 1708, in action_status
    output = ua_status.format_tabular(status)
  File "/usr/lib/python3/dist-packages/uaclient/status.py", line 659, in format_tabular
    pairs.append(("Valid until", format_expires(status["expires"])))
  File "/usr/lib/python3/dist-packages/uaclient/status.py", line 574, in format_expires
    return expires.strftime("%c %Z")
AttributeError: 'NoneType' object has no attribute 'strftime'

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: ubuntu-advantage-tools 27.13.2~18.04.1
ProcVersionSignature: Ubuntu 4.15.0-1084.93-fips 4.15.18
Uname: Linux 4.15.0-1084-fips x86_64
ApportVersion: 2.20.9-0ubuntu7.28
Architecture: amd64
Date: Thu Feb 2 05:13:58 2023
InstallationDate: Installed on 2022-02-07 (359 days ago)
InstallationMedia: Ubuntu-Server 18.04.6 LTS "Bionic Beaver" - Release amd64 (20210915)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ubuntu-advantage-tools
UpgradeStatus: No upgrade log present (probably fresh install)
cloud-id.txt-error: Invalid command specified 'cloud-id'.
livepatch-status.txt-error: Invalid command specified '/snap/bin/canonical-livepatch status'.
ua-status.json-error: Failed running command 'pro status --format json' [exit(1)]. Message:
ubuntu-advantage-timer.log:
 2023-02-02 05:12:14,607 - timer.py:(48) [DEBUG]: Running job: metering
 2023-02-02 05:12:15,112 - timer.py:(50) [DEBUG]: Executed job: metering
 2023-02-02 05:12:15,114 - timer.py:(48) [DEBUG]: Running job: update_messaging
 2023-02-02 05:12:15,676 - timer.py:(50) [DEBUG]: Executed job: update_messaging

Revision history for this message
Hatim (hatimbekhushi) wrote :
Changed in ubuntu-advantage-tools (Ubuntu):
assignee: nobody → Hatim (hatimbekhushi)
information type: Private → Public
Changed in ubuntu-advantage-tools (Ubuntu):
assignee: Hatim (hatimbekhushi) → Grant Orndorff (orndorffgrant)
tags: removed: need-amd64-retrace
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thank you Hatim for reporting, this is known, confirmed and soon fixed.
There is a bug that is a bit further already, marking yours as a duplicate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.