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

"Add-on Error" during upload: AttributeError: Calling operator "bpy.ops.export_scene.fbx" error, could not be found #57

Closed
TheoriginalNeko opened this issue Aug 13, 2024 · 17 comments
Labels
bug Something isn't working can't reproduce Unable to reproduce the issue question Further information is requested

Comments

@TheoriginalNeko
Copy link

TheoriginalNeko commented Aug 13, 2024

When I press upload it says in Upload Status Add-on error
Screenshot 2024-08-13 162741

@Nightriff
Copy link
Collaborator

To get more details about this error, can you share the console output during the upload attempt?

  • On Windows, in Blender go to Window > Toggle System Console to see the console.
  • On Mac OS, you'll need to start Blender from a terminal window.

@Nightriff Nightriff added bug Something isn't working question Further information is requested labels Aug 21, 2024
@Nightriff Nightriff changed the title Upload error "Add-on Error" during upload attempt Aug 21, 2024
@Autonvilkku
Copy link


FBX export starting... 'C:\\Users\\antti\\AppData\\Local\\Temp\\tmpl7tpebc7\\pistol.fbx'
export finished in 0.0000 sec.
Traceback (most recent call last):
  File "C:\Users\antti\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\roblox-blender-plugin\lib\upload_operator.py", line 243, in upload_task_complete
    operation = task.result()
                ^^^^^^^^^^^^^
  File "C:\Users\antti\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\roblox-blender-plugin\lib\upload_operator.py", line 190, in upload_task
    await oauth2_client.refresh_login_if_needed()
  File "C:\Users\antti\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\roblox-blender-plugin\lib\oauth2_client.py", line 245, in refresh_login_if_needed
    new_token_data = await self.__refresh_tokens(refresh_token)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\antti\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\roblox-blender-plugin\lib\oauth2_client.py", line 322, in __refresh_tokens
    raise exception
  File "C:\Users\antti\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\roblox-blender-plugin\lib\oauth2_client.py", line 316, in __refresh_tokens
    response.raise_for_status()  # Raises ClientResponseError or other ClientError
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\antti\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\roblox-blender-plugin\dependencies_public\aiohttp\client_reqrep.py", line 1011, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message='Token has been revoked', url=URL('https://apis.roblox.com/oauth/v1/token')




this is the console

@TheoriginalNeko
Copy link
Author

@Nightriff and @Autonvilkku Here is the Terminal stuff:

Read prefs: "C:\Users\Gamergodyt\AppData\Roaming\Blender Foundation\Blender\4.1\config\userpref.blend"
Registered Power Sequencer with 72 modules
Reloading external rigs...
Reloading external metarigs...
register_class(...):
Info: Registering panel class: 'TEXTURE_PT_colors', bl_idname 'TEXTURE_PT_colors' has been registered before, unregistering previous
register_class(...):
Info: Registering operator class: 'OBJECT_OT_AlignOperator', bl_idname 'object.align' has been registered before, unregistering previous

To use POV centric workspaces you can set POV render option
and save it with File > Defaults > Save Startup File menu
Read blend: "C:\Users\Gamergodyt\OneDrive\Documents\untitled.blend"
Traceback (most recent call last):
File "C:\Users\Gamergodyt\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\roblox-blender-plugin\lib\oauth2_login_operators.py", line 81, in on_refresh_complete
task.result()
File "C:\Users\Gamergodyt\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\roblox-blender-plugin\lib\oauth2_client.py", line 245, in refresh_login_if_needed
new_token_data = await self.__refresh_tokens(refresh_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Gamergodyt\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\roblox-blender-plugin\lib\oauth2_client.py", line 322, in __refresh_tokens
raise exception
File "C:\Users\Gamergodyt\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\roblox-blender-plugin\lib\oauth2_client.py", line 316, in __refresh_tokens
response.raise_for_status() # Raises ClientResponseError or other ClientError
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Gamergodyt\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\roblox-blender-plugin\dependencies_public\aiohttp\client_reqrep.py", line 1011, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message='Token has been revoked', url=URL('https://apis.roblox.com/oauth/v1/token')
Traceback (most recent call last):
File "C:\Users\Gamergodyt\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\roblox-blender-plugin\lib\upload_operator.py", line 156, in upload
export_fbx(scene, view_layer, target_object, exported_file_path, add_on_preferences)
File "C:\Users\Gamergodyt\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\roblox-blender-plugin\lib\export_fbx.py", line 61, in export_fbx
bpy.ops.export_scene.fbx(
File "C:\Program Files\Blender Foundation\Blender 4.1\4.1\scripts\modules\bpy\ops.py", line 109, in call
ret = _op_call(self.idname_py(), kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: Calling operator "bpy.ops.export_scene.fbx" error, could not be found

@Nightriff
Copy link
Collaborator

Nightriff commented Aug 22, 2024

The Token has been revoked error is related to login; the add-on goes to refresh your access token but Roblox's server says the refresh token was revoked, which happens after a fixed amount of time or when logging out. When encountering that error, the add-on should be re-prompting you to log in. Let me know if that didn't happen. In any case, you should be able to resolve that by logging out of the plugin and logging back in.

But I see a second error, bpy.ops.export_scene.fbx operator could not be found. That seems unusual, and is likely the cause of the "Add-on error" message you're seeing. I'm unfortunately not able to reproduce this using Blender 4.1.1 (I see you're also on 4.1).

Would you be able to take a screen recording of the upload process? I'm curious if there's anything unusual about your blender layout causing a wrong context to exist where the export_scene.fbx operator isn't available.

@TheoriginalNeko
Copy link
Author

I can't take a screen recording can you tell me more about "blender layout causing a wrong context to exist where the export_scene.fbx operator isn't available." Because that might be somthing thats causing it.

@TheoriginalNeko
Copy link
Author

Also I've tried to log out and log bag in before but it didn't do anything.

@TheoriginalNeko
Copy link
Author

I fixed it!

@Nightriff
Copy link
Collaborator

@TheoriginalNeko I'm glad the issue was resolved for you. Did you figure out what fixed it, so that others who are experiencing this can also learn?

@Nightriff Nightriff added the can't reproduce Unable to reproduce the issue label Oct 10, 2024
@Nightriff
Copy link
Collaborator

Closing this since no further information was provided. Feel free to comment if there's more to add.

@PlasmaShield27
Copy link

Im having trouble with this as well I was excited to see this only to discover that it never answered my question

@Nightriff
Copy link
Collaborator

Nightriff commented Oct 16, 2024

@PlasmaShield27 Thanks for adding your voice. To help diagnose, can you share the output from the console during the upload attempt?

  • On Windows, in Blender go to Window > Toggle System Console to see the console.
  • On Mac OS, you'll need to start Blender from a terminal window.

The more data points we have here, hopefully the closer we get to figuring out the cause. Re-opening this issue.

@Nightriff Nightriff reopened this Oct 16, 2024
@PlasmaShield27
Copy link

ok I'll do that

Read blend: "C:\Users\charl\OneDrive\Documents\Sword 1.blend"

FBX export starting... 'C:\Users\charl\AppData\Local\Temp\tmpm4nqemr6\Eye\Gem.fbx'
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\addons_core\io_scene_fbx_init_.py", line 596, in execute
return export_fbx_bin.save(self, context, **keywords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\addons_core\io_scene_fbx\export_fbx_bin.py", line 3647, in save
ret = save_single(operator, context.scene, depsgraph, filepath, **kwargs_mod)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\addons_core\io_scene_fbx\export_fbx_bin.py", line 3531, in save_single
encode_bin.write(filepath, root, FBX_VERSION)
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\addons_core\io_scene_fbx\encode_bin.py", line 402, in write
with open(fn, 'wb') as f:
^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\charl\AppData\Local\Temp\tmpm4nqemr6\Eye\Gem.fbx'
Error: Python: Traceback (most recent call last):
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\addons_core\io_scene_fbx_init_.py", line 596, in execute
return export_fbx_bin.save(self, context, **keywords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\addons_core\io_scene_fbx\export_fbx_bin.py", line 3647, in save
ret = save_single(operator, context.scene, depsgraph, filepath, **kwargs_mod)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\addons_core\io_scene_fbx\export_fbx_bin.py", line 3531, in save_single
encode_bin.write(filepath, root, FBX_VERSION)
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\BlendTraceback (most recent call last):
File "C:\Users\charl\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\roblox-blender-plugin-main\lib\upload_operator.py", line 156, in upload
export_fbx(scene, view_layer, target_object, exported_file_path, add_on_preferences)
File "C:\Users\charl\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\roblox-blender-plugin-main\lib\export_fbx.py", line 61, in export_fbx
bpy.ops.export_scene.fbx(
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\modules\bpy\ops.py", line 109, in call
ret = op_call(self.idname_py(), kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Error: Python: Traceback (most recent call last):
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\addons_core\io_scene_fbx_init
.py", line 596, in execute
return export_fbx_bin.save(self, context, **keywords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\addons_core\io_scene_fbx\export_fbx_bin.py", line 3647, in save
ret = save_single(operator, context.scene, depsgraph, filepath, **kwargs_mod)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\addons_core\io_scene_fbx\export_fbx_bin.py", line 3531, in save_single
encode_bin.write(filepath, root, FBX_VERSION)
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\addons_core\io_scene_fbx\encode_bin.py", line 402, in write
with open(fn, 'wb') as f:
^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\charl\AppData\Local\Temp\tmpm4nqemr6\Eye\Gem.fbx'
Location: C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\modules\bpy\ops.py:109

... truncated
FBX export starting... 'C:\Users\charl\AppData\Local\Temp\tmpf0_a5hcq\Eye\Gem.fbx'
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\addons_core\io_scene_fbx_init_.py", line 596, in execute
return export_fbx_bin.save(self, context, **keywords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\addons_core\io_scene_fbx\export_fbx_bin.py", line 3647, in save
ret = save_single(operator, context.scene, depsgraph, filepath, **kwargs_mod)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\addons_core\io_scene_fbx\export_fbx_bin.py", line 3531, in save_single
encode_bin.write(filepath, root, FBX_VERSION)
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\addons_core\io_scene_fbx\encode_bin.py", line 402, in write
with open(fn, 'wb') as f:
^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\charl\AppData\Local\Temp\tmpf0_a5hcq\Eye\Gem.fbx'
Error: Python: Traceback (most recent call last):
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\addons_core\io_scene_fbx_init_.py", line 596, in execute
return export_fbx_bin.save(self, context, **keywords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\addons_core\io_scene_fbx\export_fbx_bin.py", line 3647, in save
ret = save_single(operator, context.scene, depsgraph, filepath, **kwargs_mod)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\addons_core\io_scene_fbx\export_fbx_bin.py", line 3531, in save_single
encode_bin.write(filepath, root, FBX_VERSION)
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\BlendTraceback (most recent call last):
File "C:\Users\charl\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\roblox-blender-plugin-main\lib\upload_operator.py", line 156, in upload
export_fbx(scene, view_layer, target_object, exported_file_path, add_on_preferences)
File "C:\Users\charl\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\roblox-blender-plugin-main\lib\export_fbx.py", line 61, in export_fbx
bpy.ops.export_scene.fbx(
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\modules\bpy\ops.py", line 109, in call
ret = op_call(self.idname_py(), kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Error: Python: Traceback (most recent call last):
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\addons_core\io_scene_fbx_init
.py", line 596, in execute
return export_fbx_bin.save(self, context, **keywords)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\addons_core\io_scene_fbx\export_fbx_bin.py", line 3647, in save
ret = save_single(operator, context.scene, depsgraph, filepath, **kwargs_mod)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\addons_core\io_scene_fbx\export_fbx_bin.py", line 3531, in save_single
encode_bin.write(filepath, root, FBX_VERSION)
File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\addons_core\io_scene_fbx\encode_bin.py", line 402, in write
with open(fn, 'wb') as f:
^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\charl\AppData\Local\Temp\tmpf0_a5hcq\Eye\Gem.fbx'
Location: C:\Program Files\WindowsApps\BlenderFoundation.Blender_4.2.2.0_x64__ppwjx1n5r4v9t\Blender\4.2\scripts\modules\bpy\ops.py:109

@PlasmaShield27
Copy link

PlasmaShield27 commented Oct 16, 2024

sorry it's a lot and I don't know a lot about coding in python

I do see a file not found error and a runtime error if that helps any?
I'm usually in school until 4:00 so I'll be able to respond around 5:30pm-9:00pm US est on weekdays and all day on weekends

@PlasmaShield27
Copy link

FYI i tried reinstalling the add on

@Nightriff
Copy link
Collaborator

Thanks for the output @PlasmaShield27

I think in your case, the problem is due to the slash / in the object name causing a problem with the export because it thinks the Eye is a folder on the file system rather than part of the file name.

If you rename your object to not have a slash in it, it should export with no problem.

I'll create an issue to sanitize the file name to avoid exporting to the file system with a bad file name.

@Nightriff Nightriff changed the title "Add-on Error" during upload attempt "Add-on Error" during upload: AttributeError: Calling operator "bpy.ops.export_scene.fbx" error, could not be found Oct 17, 2024
@Nightriff
Copy link
Collaborator

Nightriff commented Oct 17, 2024

Since Add-on Error can be caused by multiple things, I'm going to start separating issues based on the cause of the Add-on Error to avoid this issue becoming a monolith.

Adjusted the title of this issue to reflect the original error message for this post.

Closing again since this issue does not have enough information to diagnose and I can't reproduce the error.

Feel free to comment if you have something further to add related to AttributeError: Calling operator "bpy.ops.export_scene.fbx" error, could not be found

If you have an Add-on Error message but a different error reason in the output, please open a new issue.

@Nightriff Nightriff closed this as not planned Won't fix, can't repro, duplicate, stale Oct 17, 2024
@PlasmaShield27
Copy link

Thank you it worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working can't reproduce Unable to reproduce the issue question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants