Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File Not Found error in the BlenderWebViewer.py file after clicking on the export button #2

Open
knightcube opened this issue May 23, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@knightcube
Copy link

Clicking on the export button throws this "File Not Found" error.

Python: Traceback (most recent call last):
  File "Blender Foundation\Blender\3.0\scripts\addons\BlenderWebViewer.py", line 108, in execute
    export_gltf(apply_modifiers, path)
  
File "Blender Foundation\Blender\3.0\scripts\addons\BlenderWebViewer.py", line 21, in export_gltf
    bpy.ops.export_scene.gltf(filepath=path, export_format='GLB', use_selection=True, export_apply=apply_modifiers, export_lights=True, export_cameras=True)

File "Blender Foundation\Blender 3.0\3.0\scripts\modules\bpy\ops.py", line 132, in __call__
    ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Error: Python: Traceback (most recent call last):
 
File "Blender Foundation\Blender 3.0\3.0\scripts\addons\io_scene_gltf2\__init__.py", line 637, in execute
    return gltf2_blender_export.save(context, export_settings)

File "Blender Foundation\Blender 3.0\3.0\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 51, in save
    __write_file(json, buffer, export_settings)
  
File "Blender Foundation\Blender 3.0\3.0\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 142, in __write_file
    gltf2_io_export.save_gltf(
 
File "..\blender\exp\gltf2_io_export.py", line 80, in save_gltf
    file = open(export_settings['gltf_filepath'], "wb")

FileNotFoundError: [Errno 2] No such file or directory: 'F:\\Blender Add ons\\BlenderWebViewer\\public\\scene.glb'

location: Blender Foundation\Blender 3.0\3.0\scripts\modules\bpy\ops.py:132

location: <unknown location>:-1

Also, running npm run dependencies gave this error👇

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: gltfjsx@4.6.3
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0.0" from the root project
npm ERR!   peer react@"^16.8.0  || >=17.0.0 || >=18.0.0" from @react-spring/web@
9.4.5
npm ERR!   node_modules/@react-spring/web
npm ERR!     @react-spring/web@"^9.2.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^18.1.0" from react-dom@18.1.0
npm ERR! node_modules/react-dom
npm ERR!   peer react-dom@"^16.8.0  || >=17.0.0 || >=18.0.0" from @react-spring/
web@9.4.5
npm ERR!   node_modules/@react-spring/web
npm ERR!     @react-spring/web@"^9.2.4" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

So I tried running npm run dependencies --legacy-peer-deps and it compiled successfully but showed "1 high severity vulnerability"

@elia-orsini
Copy link
Owner

@knightcube I am familiar with the first error. sometimes it happens that the path selected is not absolute and it throws an error. I need to look into it. It can easily be fixed by pasting the absolute url manually.
I will also take a look at the dependencies. thanks for reporting those bugs.

@knightcube
Copy link
Author

@elia-orsini I actually tried pasting the absolute URL manually too but unfortunately, it still shows the same error. I also tried removing the spaces between the characters. This is the URL that I am using - F:\BlenderAddons\BlenderWebViewer\

@elia-orsini elia-orsini added the bug Something isn't working label Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants