organize icon indicating copy to clipboard operation
organize copied to clipboard

subfolders refer to root directory

Open sueng66 opened this issue 3 years ago • 4 comments

when I activate the subfolders , the subfolder found refer to root directory :

 organizing
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│                                                                                                  │
│ /usr/local/miniconda3/lib/python3.8/site-packages/organize/cli.py:90 in run_local                │
│                                                                                                  │
│    87 │   │   console.info(config_path=config_path, working_dir=working_dir)                     │
│    88 │   │   config = config_path.read_text()                                                   │
│    89 │   │   os.chdir(working_dir)                                                              │
│ ❱  90 │   │   core.run(rules=config, simulate=simulate)                                          │
│    91 │   except NeedsMigrationError as e:                                                       │
│    92 │   │   console.error(e, title="Config needs migration")                                   │
│    93 │   │   console.warn(                                                                      │
│ /usr/local/miniconda3/lib/python3.8/site-packages/organize/core.py:326 in run                    │
│                                                                                                  │
│   323 │   │   console.warn(msg)                                                                  │
│   324 │                                                                                          │
│   325 │   # run                                                                                  │
│ ❱ 326 │   count = run_rules(rules=rules, simulate=simulate)                                      │
│   327 │   console.summary(count)                                                                 │
│   328 │                                                                                          │
│   329 │   if count["fail"]:                                                                      │
│                                                                                                  │
│ /usr/local/miniconda3/lib/python3.8/site-packages/organize/core.py:259 in run_rules              │
│                                                                                                  │
│   256 │   │   │   walk = walker.files if target == "files" else walker.dirs                      │
│   257 │   │   │   print(walk(fs=walker_fs, path=walker_path))                                    │
│   258 │   │   │   for path in walk(fs=walker_fs, path=walker_path):                              │
│ ❱ 259 │   │   │   │   if walker_fs.islink(path):                                                 │
│   260 │   │   │   │   │   continue                                                               │
│   261 │   │   │   │   # tell the user which resource we're handling                              │
│   262 │   │   │   │   console.path(walker_fs, path)                                              │
│                                                                                                  │
│ /usr/local/miniconda3/lib/python3.8/site-packages/fs/osfs.py:621 in islink                       │
│                                                                                                  │
│   618 │   │   _path = self.validatepath(path)                                                    │
│   619 │   │   sys_path = self._to_sys_path(_path)                                                │
│   620 │   │   if not self.exists(path):                                                          │
│ ❱ 621 │   │   │   raise errors.ResourceNotFound(path)                                            │
│   622 │   │   with convert_os_errors("islink", path):                                            │
│   623 │   │   │   return os.path.islink(sys_path)                                                │
│   624                                                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ResourceNotFound: resource '/PlatformIO/Projects/cascontrollerimx/.pio/build/mimxrt1010_evk/zephyr/misc/generated/syscalls_links/include_drivers_clock_control' not found

PlatformIO is a subfolder in my Documents which is my locations

sueng66 avatar Feb 19 '22 00:02 sueng66

Can you post your config?

tfeldmann avatar Feb 19 '22 12:02 tfeldmann

here is my config :

# organize configuration file
# https://organize.readthedocs.io

rules:
  - name: "Find images"
    locations:
      - ~/Documents/
    subfolders: true
    filters:
      - extension:
          - jpg
          - JPG
          - jpeg
          - png
          - PNG
          - gif
          - tiff
    actions:
      - echo: "Found image"

sueng66 avatar Feb 20 '22 04:02 sueng66

Super strange. I just tested your config and it works perfectly for me. Is include_drivers_clock_control a symlink or hardlink or something like that?

tfeldmann avatar Mar 19 '22 14:03 tfeldmann

was running into this issue too. apparently, this is caused by broken symlinks. I had some old ones that didn't point anywhere

zany130 avatar Aug 24 '22 17:08 zany130

I'll close this issue because it most likely is some symlink strangeness. Please try again with the latest v3.x and feel free to open this issue again if anything's not working 👍

tfeldmann avatar Feb 18 '24 11:02 tfeldmann