Skip to content

FileNotFoundError: [Errno 2] No such file or directory #206

Closed

Description

@jim-seovendor

Strata - Qwen3.8-Flash-Next on a normal PC (a GPU + system RAM + CPU)

=== Step 1: checking your PC ===
[ok] GPU: NVIDIA GeForce RTX 3070 Laptop GPU, 8.0 GB VRAM, compute capability 8.6, driver 616.92
[!] less than 12 GB of VRAM: Strata will run, but most experts stay on the CPU and it will be slow
[ok] RAM: 32 GB
[ok] CPU: 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz (AVX-512)

=== Step 2: your choices ===

  1. Qwen3.8-Flash-Next Qwen; GSQ-RCO quants by ISTA-DASLab - the original model

  2. Swift 1.5 UkisAI's fine-tune of Qwen3.8-Flash-Next - thinks much shorter (-63% thinking tokens, 1.8x sooner answers by its authors' numbers)

  3. Qwen3.8-Flash-Next Coder ISTA-DASLab's coding version - half the experts (code, tools, images kept): needs ~32 GB of RAM, faster; weaker outside coding
    Which model? [1]: 1
    [ok] model: Qwen3.8-Flash-Next

  4. Q2_0 2-bit, the fastest; download 66 GB, uses ~34 GB of RAM <- needs 48 GB RAM, you have 32

  5. IQ2_XS 2-bit i-quant, a little better quality, close in speed; download 68 GB, uses ~36 GB of RAM <- needs 48 GB RAM, you have 32

  6. IQ3_XXS 3-bit i-quant, better quality, slower (more CPU work per token); download 76 GB, uses ~43 GB of RAM <- needs 60 GB RAM, you have 32

  7. IQ3_S 3.5-bit i-quant, the best quality (matches the full model), the slowest; needs a 64 GB PC with little else running; download 84 GB, uses ~50 GB of RAM <- needs 62 GB RAM, you have 32
    Which size? [1]: 1
    [ok] low-RAM mode: Q2_0's experts (34 GB) are read from the model folder through the OS file cache instead of a copy in RAM (32 GB); the GPU holds ~9% of them
    [!] most of the experts are read from the SSD while it answers: expect it to be much slower than with enough RAM (a faster SSD and a smaller size help)
    [ok] size: Q2_0

Context length = how much text the model can see at once (your chat, files, tool output).
Longer needs more VRAM for it, so fewer experts fit on the GPU:

  1. 8K tokens
  2. 32K tokens (recommended for your GPU)
  3. 64K tokens
  4. 128K tokens
  5. 256K tokens
    Context? [2]: 3
    [ok] context: 65536 tokens

KV cache precision (the model's memory of the conversation):

  1. 8-bit (recommended: what every published number was measured with)
  2. 4-bit half the memory (about 4% faster at 128K), but measurably less precise on long
    documents; long-context lookups (needle tests) still pass
    KV cache? [1]: 1
    [ok] KV cache: 8-bit

Images: the model can also read pictures (screenshots, photos, scanned pages). This adds a 0.9 GB
download and keeps ~1.4 GB of VRAM free for the image encoder, so text is a few % slower.
Do you want images? [n]: n
[ok] images: off

EXPERIMENTAL - speed projection: a small control vector applied while the model runs (layers 4-44).
It changes how the model answers: its package describes it as a refusal-direction projection (the
model declines far fewer requests). Off unless you choose it; when on, the web app can switch it off
per chat. Details: data/experimental-speed-projection/README.md
Turn on the experimental speed projection? [n]: n
[ok] experimental speed projection: off

=== Step 3: Python packages ===
Installing numpy, jinja2, regex, pyyaml, tqdm, requests, cmake, ninja, pillow, psutil ...

C:\Users\user\Downloads\Strata-main\Strata-main.venv\Scripts\python.exe -m pip install --quiet --disable-pip-version-check numpy jinja2 regex pyyaml tqdm requests cmake ninja pillow psutil
[ok] numpy, jinja2, regex, pyyaml, tqdm, requests, cmake, ninja, pillow, psutil installed

=== Step 4: the Strata engine ===
llama.cpp source: 33.6 MB
[ok] llama.cpp source downloaded
Traceback (most recent call last):
File "C:\Users\user\Downloads\Strata-main\Strata-main\setup.py", line 2057, in
sys.exit(main())
~~~~^^
File "C:\Users\user\Downloads\Strata-main\Strata-main\setup.py", line 1877, in main
llama = get_llama_cpp()
File "C:\Users\user\Downloads\Strata-main\Strata-main\setup.py", line 641, in get_llama_cpp
f.extractall(tmp)
~~~~~~~~~~~~^^^^^
File "C:\Users\user\AppData\Local\Python\pythoncore-3.14-64\Lib\zipfile_init_.py", line 1876, in extractall
self.extract_member(zipinfo, path, pwd)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Python\pythoncore-3.14-64\Lib\zipfile_init
.py", line 1947, in _extract_member
open(targetpath, "wb") as target:
~~~~^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\user\Downloads\Strata-main\Strata-main\third_party\_unpack\llama.cpp-3cf03257f219afbe7334045ff7c6a06ac68c627d\tools\ui\src\lib\components\app\chat\ChatAttachments\ChatAttachmentsList\ChatAttachmentsListItem\ChatAttachmentsListItemThumbnailImage.svelte'
Press any key to continue . . .

Activity

  1. gsiisg commented on Sep 30, 2026

    @gsiisg
    1. Press the Windows Key + R to open the Run dialog box.
    2. Type regedit and press Enter to open the Registry Editor. Click Yes if a user account control prompt appears.
    3. Navigate to the following folder path in the left sidebar:
      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
    4. Look for a value named LongPathsEnabled in the right pane.
      • If it doesn't exist: Right-click an empty space in the right pane, select New > DWORD (32-bit) Value, and name it LongPathsEnabled.
    5. Double-click LongPathsEnabled.
    6. Change the Value data from 0 to 1.
    7. Click OK and restart your computer for the changes to take effect.
  2. Niko1221 commented on Sep 30, 2026

    @Niko1221
    Owner

    Thanks. That's Windows' 260-character path limit: the zip holds llama.cpp's web UI with very deep paths. 0.1.28 (in testing) doesn't unpack that part, which Strata doesn't use. Until then, move the folder somewhere short like C:\Strata and run it again.

  3. Niko1221 commented on Sep 30, 2026

    @Niko1221
    Owner

    Fixed in 0.1.28: setup no longer unpacks llama.cpp's web UI (the deep paths). Please reopen if setup still stops in a deep folder.

  4. ElGuyARc commented on Nov 3, 2026

    @ElGuyARc

    New evidence for the deep-folder setup problem in this thread: the tools/ui exclusion fixes that member family, but a different member in the same pinned llama.cpp archive still exceeds Windows' ordinary path limit.

    Area / entry point

    [Other] — source setup, get_llama_cpp().

    What happened

    A desktop integration originally reported FileNotFoundError: [Errno 2] while extracting this archive member at an absolute destination length of exactly 260 characters:

    llama.cpp-3cf03257f219afbe7334045ff7c6a06ac68c627d/benches/dgx-spark/aime25_openai__gpt-oss-120b-high_temp1.0_20251109_094547_allresults.json
    

    That original October report came from an older setup copy; its upstream version was not recorded, so I am not labelling it a complete 0.2.10 setup run. I have now reproduced the extraction failure with the actual 0.2.10 get_llama_cpp() function, isolated offline as described below.

    Current reproduction

    • Strata source tag: v0.2.10, commit ffa80d73133ea5c548aefe57889a16e8085a938f.
    • setup.py SHA-256: fc761f5cf6fcc2b70118ae6c484e72c7dd554262ebff59e12a380206a1563c55.
    • Windows x64, version 10.0.26220; Python 3.13.15. GPU and RAM are not involved in this fixture.
    • No model, engine, compiler, network request or registry change is needed.

    The self-contained fixture below reads only that function's AST from an unmodified setup.py. It supplies a tiny local ZIP with the exact member name above and synthetic {} contents, plus the two directory markers the function expects. Its download hook only checks that the local fixture ZIP exists. All extraction, filtering, moves and cleanup otherwise use the real function. No Windows errors are injected.

    Run from a source checkout:

    python -I -B .\reproduce_zip_maxpath.py .\setup.py

    If the process's temporary directory is itself deeply nested, pass --scratch-root naming an existing short writable temporary directory.

    Observed on the same Windows process:

    Extraction destination Unmodified function Isolated extended-destination variant
    260 characters FileNotFoundError, errno 2 Not run
    365 characters FileNotFoundError, errno 2 / WinError 3 Pass

    The variant changes only the temporary extraction destination to Windows' extended-path form. It still includes the benchmark member and still excludes tools/ui. This is evidence for the path handling direction, not a proposed complete patch or an archive-security review. Machines where ordinary long paths already work may not reproduce the failure.

    Expected / actual

    Expected: setup can unpack its pinned source dependency in a deep writable cache without requiring a machine-wide policy change, or gives an actionable path-length error.

    Actual: setup.py lines 3615–3653 still extracts to an ordinary tmp path and filters only tools/ui; the benchmark member remains eligible and fails before engine preparation finishes. The existing strata_control.longpath helper appears relevant, but I have not changed upstream code.

    Scope and limits

    Reproduced locally: the isolated current source function's extraction failure and the extended-path control. Not run: a full 0.2.10 model download/setup, engine launch, inference or GPU test. The original user's private paths and logs are omitted.

    Would you prefer to reopen this thread for the remaining non-UI archive paths? I searched open and closed issues for the function name, MAX_PATH, the benchmark filename and benches/dgx-spark; I did not find a more specific existing report.

    Offline reproduction: reproduce_zip_maxpath.py
    """Offline source-function fixture. No models, compiler, registry or network.
    
    Usage: python -I -B reproduce_zip_maxpath.py path/to/Strata/setup.py
    Only get_llama_cpp's AST is executed. Its download function is replaced with
    an assertion that the deliberately synthetic ZIP already exists locally.
    """
    import argparse,ast,contextlib,hashlib,json,os,pathlib,platform,shutil,tempfile,time,zipfile
    
    COMMIT='3cf03257f219afbe7334045ff7c6a06ac68c627d'
    BENCH='benches/dgx-spark/aime25_openai__gpt-oss-120b-high_temp1.0_20251109_094547_allresults.json'
    MEMBER='llama.cpp-'+COMMIT+'/'+BENCH
    PAYLOAD=b'{}\n'  # Synthetic text, not the benchmark's real data.
    
    def extended(p):
     text=os.path.abspath(os.fspath(p))
     if os.name!='nt' or text.startswith('\\\\?\\'):return text
     return '\\\\?\\UNC\\'+text[2:] if text.startswith('\\\\') else '\\\\?\\'+text
    
    @contextlib.contextmanager
    def disposable(scratch_root):
     scratch=tempfile.mkdtemp(prefix='strata-zip-',dir=scratch_root)
     try:yield scratch
     finally:
      assert pathlib.Path(scratch).name.startswith('strata-zip-')
      # Cleanup uses native extended paths too; this changes no machine policy.
      shutil.rmtree(extended(scratch))
    
    def fixture(node,target_len,normalize_tmp=False,scratch_root=None):
     with disposable(scratch_root) as scratch:
      # Calculate a destination with the exact measured number of path characters.
      tail=os.path.join('third_party','_unpack',*MEMBER.split('/'))
      padding=target_len-len(scratch)-len(tail)-2
      if padding<1:raise RuntimeError('Temporary root is too long for this boundary fixture')
      home=pathlib.Path(scratch)/('d'*padding);third=home/'third_party';os.makedirs(extended(third))
      archive=third/('llama.cpp-'+COMMIT[:7]+'.zip')
      with zipfile.ZipFile(extended(archive),'w') as z:
       z.writestr(MEMBER,PAYLOAD)
       z.writestr('llama.cpp-'+COMMIT+'/ggml/CMakeLists.txt','synthetic')
       z.writestr('llama.cpp-'+COMMIT+'/gguf-py/','')
       z.writestr('llama.cpp-'+COMMIT+'/tools/ui/excluded.txt','must be excluded')
      destination=home/'third_party'/'_unpack'/pathlib.Path(*MEMBER.split('/'))
      assert len(str(destination))==target_len
      calls={'cachedZipHook':0}
      def download(_url,p,_label):
       calls['cachedZipHook']+=1
       assert p==archive and pathlib.Path(extended(p)).is_file()
      chosen=node
      if normalize_tmp:
       # Proof-of-direction only: change this one destination in the isolated AST,
       # not the reviewed source file, and leave the member filter unchanged.
       import copy
       chosen=copy.deepcopy(node)
       for item in ast.walk(chosen):
        if isinstance(item,ast.Assign) and any(isinstance(t,ast.Name) and t.id=='tmp' for t in item.targets):
         item.value=ast.Call(func=ast.Name(id='_extended_path',ctx=ast.Load()),args=[item.value],keywords=[])
       ast.fix_missing_locations(chosen)
      scope={'home':lambda:home,'LLAMA_CPP_COMMIT':COMMIT,'LLAMA_CPP_ZIP':'https://invalid.example/offline-only','download':download,'shutil':shutil,'zipfile':zipfile,'time':time,'drop_archive':lambda _p:None,'warn':lambda _s:None,'_extended_path':lambda p:pathlib.Path(extended(p))}
      exec(compile(ast.Module(body=[chosen],type_ignores=[]),'<reviewed-get_llama_cpp>','exec'),scope)
      try:
       result=scope['get_llama_cpp']();out=pathlib.Path(extended(result/BENCH))
       assert out.read_bytes()==PAYLOAD
       assert not pathlib.Path(extended(result/'tools/ui/excluded.txt')).exists()
       return {'pathCharacters':target_len,'extendedTmpCandidate':normalize_tmp,'outcome':'passed','calls':calls}
      except OSError as error:
       return {'pathCharacters':target_len,'extendedTmpCandidate':normalize_tmp,'outcome':'failed','exceptionType':type(error).__name__,'errno':error.errno,'winerror':getattr(error,'winerror',None),'calls':calls}
    
    def main():
     parser=argparse.ArgumentParser();parser.add_argument('setup_source');parser.add_argument('--scratch-root',help='Existing short writable temporary directory, if TEMP is redirected to a long path');args=parser.parse_args()
     source=pathlib.Path(args.setup_source).read_bytes();tree=ast.parse(source);node=next(n for n in tree.body if isinstance(n,ast.FunctionDef) and n.name=='get_llama_cpp')
     code=ast.get_source_segment(source.decode('utf8'),node)
     assert '"/tools/ui/" not in m' in code and 'f.extractall(tmp,' in code
     results=[fixture(node,260,scratch_root=args.scratch_root),fixture(node,365,scratch_root=args.scratch_root),fixture(node,365,True,scratch_root=args.scratch_root)]
     assert results[2]['outcome']=='passed'
     report={'schema':1,'sourceSha256':hashlib.sha256(source).hexdigest(),'functionSha256':hashlib.sha256(code.encode()).hexdigest(),'sourceLines':[node.lineno,node.end_lineno],'llamaCommit':COMMIT,'archiveMember':MEMBER,'syntheticMemberContents':True,'python':platform.python_version(),'os':platform.system(),'windowsVersion':platform.version() if os.name=='nt' else None,'cases':results,'publicPathsRedacted':True,'networkOperations':0,'modelsUsed':0,'registryChanges':0,'sourceFilesChanged':0,'limits':['The 260/365-character ordinary cases record this actual Python/Windows environment, not a simulated MAX_PATH refusal. Other environments may already support ordinary long paths.','The extended-destination AST variant proves direction only, not a complete upstream patch or archive-security review.']}
     print(json.dumps(report,indent=2))
    if __name__=='__main__':main()
    Sanitized result
    {
      "schema": 1,
      "sourceSha256": "fc761f5cf6fcc2b70118ae6c484e72c7dd554262ebff59e12a380206a1563c55",
      "functionSha256": "80fcfb9263ed1580f36ac42c00afc8912d80255263cdeb7e2eed79e64672d2ad",
      "sourceLines": [
        3615,
        3653
      ],
      "llamaCommit": "3cf03257f219afbe7334045ff7c6a06ac68c627d",
      "archiveMember": "llama.cpp-3cf03257f219afbe7334045ff7c6a06ac68c627d/benches/dgx-spark/aime25_openai__gpt-oss-120b-high_temp1.0_20251109_094547_allresults.json",
      "syntheticMemberContents": true,
      "python": "3.13.15",
      "os": "Windows",
      "windowsVersion": "10.0.26220",
      "cases": [
        {
          "pathCharacters": 260,
          "extendedTmpCandidate": false,
          "outcome": "failed",
          "exceptionType": "FileNotFoundError",
          "errno": 2,
          "winerror": null,
          "calls": {
            "cachedZipHook": 1
          }
        },
        {
          "pathCharacters": 365,
          "extendedTmpCandidate": false,
          "outcome": "failed",
          "exceptionType": "FileNotFoundError",
          "errno": 2,
          "winerror": 3,
          "calls": {
            "cachedZipHook": 1
          }
        },
        {
          "pathCharacters": 365,
          "extendedTmpCandidate": true,
          "outcome": "passed",
          "calls": {
            "cachedZipHook": 1
          }
        }
      ],
      "publicPathsRedacted": true,
      "networkOperations": 0,
      "modelsUsed": 0,
      "registryChanges": 0,
      "sourceFilesChanged": 0,
      "limits": [
        "The 260/365-character ordinary cases record this actual Python/Windows environment, not a simulated MAX_PATH refusal. Other environments may already support ordinary long paths.",
        "The extended-destination AST variant proves direction only, not a complete upstream patch or archive-security review."
      ]
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions