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.

{created} filter is not populated version 2.0.x

See original GitHub issue

Hi Great work on the 2.x stuff…

With the Created filter set and modified config for 2.x it seems that the created variable is not being populated

config:

  - name: "Match Images"
    locations: "~/Downloads"
    filters:
      - extension:
          - png
          - jpg
          - jpeg
          - gif
          - tiff
          - eps
      - created
    actions:
      - echo: "Found Image File CREATED: {created} {created.strftime('%Y-%m-%d')}"
      - move: "~/Nextcloud/Pictures/2020 - 2029/{created.year}/{created.month}/Daily/{created.day}/"

Output is as follows on SIM

βš™ Match Images ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
/home/marty/Downloads
  Picture 2022-02-09 10-05-19.png
    - (echo) ERROR! 'None' has no attribute 'strftime'

Debug info:

β”‚                                                                                                  β”‚
β”‚ /home/marty/.local/lib/python3.10/site-packages/organize/cli.py:87 in run_local                  β”‚
β”‚                                                                                                  β”‚
β”‚    84 β”‚   β”‚   config_dir, config_name = split(config_path)                                       β”‚
β”‚    85 β”‚   β”‚   config = open_fs(config_dir).readtext(config_name)                                 β”‚
β”‚    86 β”‚   β”‚   os.chdir(working_dir)                                                              β”‚
β”‚ ❱  87 β”‚   β”‚   core.run(rules=config, simulate=simulate)                                          β”‚
β”‚    88 β”‚   except NeedsMigrationError as e:                                                       β”‚
β”‚    89 β”‚   β”‚   console.error(e, title="Config needs migration")                                   β”‚
β”‚    90 β”‚   β”‚   console.warn(                                                                      β”‚
β”‚ /home/marty/.local/lib/python3.10/site-packages/organize/core.py:328 in run                      β”‚
β”‚                                                                                                  β”‚
β”‚   325 β”‚   console.summary(count)                                                                 β”‚
β”‚   326 β”‚                                                                                          β”‚
β”‚   327 β”‚   if count["fail"]:                                                                      β”‚
β”‚ ❱ 328 β”‚   β”‚   raise RuntimeWarning("Some actions failed.")                                       β”‚
β”‚   329  

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
tfeldmanncommented, Feb 9, 2022

So your filesystem tracks the birthtime? I guess organize should detect that by default. I’ll try to get that in!

1reaction
tfeldmanncommented, Feb 11, 2022

πŸ‘ Just for your information - you can shorten your move command:

      - move: "~/Nextcloud/Pictures/2020 - 2029/{created.strftime('%Y/%m/Daily/%d')}/"

But I guess yours is more readable!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to Find Shared Saved Filter when creating a New Board
Create a new JIRA Agile board from an existing Saved Filter. ... Copy-pasting full filter name, trying to populate it char by char...
Read more >
Select statment from a Filter Array - Power Platform Community
Solved: Hi, im runing a flow which suppose to get a list of items from excel than im filtering it with Filter array....
Read more >
Filter Data from Your Views - Tableau Help
Note: In Tableau Desktop, you can add an interactive filter to the view for a field that is not currently used in the...
Read more >
How to Create Jira Filters: The Complete 2022 Guide - iDalko
Learn how to create, edit, manage, and share filters in Jira, and how they can make Jira an even more powerful platform for...
Read more >
Filter Query in SharePoint Get Items in Power Automate
Have you tried the experimental version of Filter query in the ... Then you can now reload your flow or create a new...
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