Skip to content

now - transmission_date_done will cause crash #3745

@ProteinPig

Description

@ProteinPig

Expected behaviour:

from_transmission work correctly

Actual behaviour:

now - transmission_date_done will cause crash

Steps to reproduce:

use from_transmission in a task
then compare transmission_date_done
looks like because transmission_date_done have timezone info, that cause this bug

Config:

  clean.purge_seeds_temp:
    priority: 8
    <<: *from_transmission
    if:
      - transmission_progress != 100.0: reject
      - now - transmission_date_done >= timedelta(days=10) and 'temp' in transmission_downloadDir: accept
    <<: *purge_transmission

Log:

(click to expand)
transmission_date_active       : 2023-04-16 04:50:58                                                                
transmission_date_added        : 2023-02-14 17:20:38                                                                
transmission_date_done         : 2023-02-15 18:55:26+08:00                                                          
transmission_date_started      : 2023-04-21 12:21:49 


TypeError: '>' not supported between instances of 'NoneType' and 'datetime.datetime'
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/flexget/task.py", line 547, in __run_plugin
    result = method(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/flexget/event.py", line 20, in __call__
    return self.func(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/flexget/plugins/clients/transmission.py", line 286, in on_task_input
    entry['transmission_date_done'] = max(torrent.added_date, torrent.done_date)
TypeError: '>' not supported between instances of 'NoneType' and 'datetime.datetime'

Additional information:

  • FlexGet version: 3.6.3
  • Python version:
  • Installation method: docker/wiserain
  • Using daemon (yes/no): yes
  • OS and version:
  • Link to crash log:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions