mherrmann / mherrmann/fman

Can't open/view files on USB device (phone)

Open
#632 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug windows
Dominant language
Python
Stars
275
Forks
16
PR merge metrics
No merged PRs in 30d

Description

I have my Samsung Galaxy S7 connected via USB (3). I have no problem accessing it and copying files (images/videos) to my PC running Windows 10 -- via File Explorer. I, however, haven't been able to browse the devices storage via fman.

After digging around for a while (granted, I am new to fman and Windows 10), I discovered the ALT+F1 shortcut to see devices. My Samsung 7 didn't appear in the list, so I tried a little workaround: I created a shortcut to the device in File Explorer and placed it on the Desktop, browsed to the desktop in fman and clicked on it.

I received the following error:

Command 'OpenFile' raised error.

Traceback (most recent call last):
  File "fman\impl\fs_cache.py", line 36, in query
KeyError: 'stat'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "fman\impl\plugins\command_registry.py", line 128, in _execute_command
  File "C:\Users\lasse\AppData\Local\fman\Versions\1.5.7\Plugins\Core\core\commands\__init__.py", line 294, in __call__
    _open_files([url], self.pane)
  File "C:\Users\lasse\AppData\Local\fman\Versions\1.5.7\Plugins\Core\core\commands\__init__.py", line 322, in _open_files
    _open_local_files(local_file_paths, pane)
  File "C:\Users\lasse\AppData\Local\fman\Versions\1.5.7\Plugins\Core\core\commands\__init__.py", line 326, in _open_local_files
    _open_local_files_win(paths, pane)
  File "C:\Users\lasse\AppData\Local\fman\Versions\1.5.7\Plugins\Core\core\commands\__init__.py", line 350, in _open_local_files_win
    if is_dir(target_url):
  File "fman\fs.py", line 22, in is_dir
  File "fman\impl\plugins\mother_fs.py", line 62, in is_dir
  File "fman\impl\plugins\mother_fs.py", line 60, in query
  File "C:\Users\lasse\AppData\Local\fman\Versions\1.5.7\Plugins\Core\core\fs\local\__init__.py", line 46, in is_dir
    return S_ISDIR(self.stat(existing_path).st_mode)
  File "fman\fs.py", line 199, in wrapper
  File "fman\impl\fs_cache.py", line 12, in query
  File "fman\impl\fs_cache.py", line 38, in query
  File "fman\fs.py", line 199, in <lambda>
  File "C:\Users\lasse\AppData\Local\fman\Versions\1.5.7\Plugins\Core\core\fs\local\__init__.py", line 51, in stat
    raise filenotfounderror(path)
FileNotFoundError: [Errno 2] No such file or directory: ''

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Samsung Galaxy S7 USB shortcut case on Windows 10, then trace the failure through fman/impl/fs_cache.py, Core/core/commands/init.py, and Core/core/fs/local/init.py. Done means the device shortcut can be opened or browsed in fman without the empty-path FileNotFoundError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.