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

Cannot install nomatter which version of blender I use. #584

Closed
7 tasks done
evamay222 opened this issue Jul 1, 2023 · 11 comments
Closed
7 tasks done

Cannot install nomatter which version of blender I use. #584

evamay222 opened this issue Jul 1, 2023 · 11 comments
Assignees
Labels
Bug Issue with specific functionality not working as intended but overall plugin is working.

Comments

@evamay222
Copy link

evamay222 commented Jul 1, 2023

@niftools/blender-niftools-addon-reviewer -

Before creating a new issue, ensure that

  • Read the user documentation.
  • Check that the issue hasn't already been reported.
  • Read through the list of Helpful resources links on the right-hand side.
  • Talk with the developers to ensure its a valid issue

The issue will get closed off immediately as invalid if

  • Looking for support where the forums, chat or documentation is more appropriate.
  • Goes off topic, loses focus or turns into a discussion.
  • Removing parts of the template the issue.

Fill out the template below to the best of your ability, including .blend files, nifs, logs; help us to help you.

Issue Overview

Cannot get addon to enable nomatter which version of Blender I try.

Version Information

Version Info

Blender 2.83
Blender 3.2
Blender 3.6
NifTools Addon v.0.1.0

Platform information

Windows 11

Context

Cannot install from zip.

Steps to Reproduce

Start Blender
Edit
Preferences
Add-ons
Install

Python Traceback
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\scripts\modules\addon_utils.py", line 330, in enable
importlib.reload(mod)
File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\importlib_init_.py", line 169, in reload
_bootstrap._exec(spec, module)
File "", line 630, in exec
File "", line 728, in exec_module
File "", line 219, in call_with_frames_removed
File "C:\Users\Chance\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools_init
.py", line 79, in
locate_dependencies()
File "C:\Users\Chance\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools_init
.py", line 74, in locate_dependencies
NifLog.info(f"Loading: Blender Niftools Addon: {version.read()}")
File "C:\Users\Chance\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_niftools\utils\logging.py", line 67, in info
NifLog.op.report({'INFO'}, str(message))
File "C:\Program Files\Blender Foundation\Blender 2.83\2.83\scripts\modules\bpy_types.py", line 709, in getattribute
properties = StructRNA.path_resolve(self, "properties")
ReferenceError: StructRNA of type NifImportOperator has been removed

#.

Expected Result

Install properly and enabled

Actual Result

Cannot enable

Possible Fix

[Optional, suggest fixes, improvement or reasons for the bug might have occurred]

Screenshot

[If relevant, include a screenshot]

Logs and Files

[Provide logs file generated during the error as well as the blend and nif files are related to the issue]

Info Bar Output

[Output from the Info View, available at top of Blender viewport, drag to expand]

Console Output

[Set the logging level to 'Debug' and attach the output of the console. Enable via Window -> Toggle Console]

Blend File

[Attach the blend file if the issue is reproducible]

Nif File

[Attach input or output files, samples of what the expected output should be and reproducing the issue]

Similar Known Issues

[Reference any known issues - https://github.com/niftools/blender_niftools_addon/issues]

Additional Information

[Anything else you feel is relevant]

@evamay222 evamay222 added the Bug Issue with specific functionality not working as intended but overall plugin is working. label Jul 1, 2023
@Hatepoem
Copy link

Hatepoem commented Jul 3, 2023

GNU/Linux Debian 12 (bookworm)
Blender 3.4.1
Similar issue.
2023-07-03-132748_1920x1080_scrot

@achzn
Copy link

achzn commented Jul 3, 2023

Also on Debian 12 and 3.4.1 and getting the same issue
Screenshot_2023-07-03_19-06-20

@svip
Copy link
Contributor

svip commented Aug 4, 2023

The problem is that the latest release is completely borked. If you open the ZIP file, you'll notice that all the files are in the same directory, with their full path as their file name. The filenames contain \ which Windows won't permit, and will confuse Python, because file structures are not supposed to work like that.

My recommendation is to just install the earlier release, which seems to be fine.

@Candoran2
Copy link
Member

The problem is that the latest release is completely borked. If you open the ZIP file, you'll notice that all the files are in the same directory, with their full path as their file name. The filenames contain \ which Windows won't permit, and will confuse Python, because file structures are not supposed to work like that.

My recommendation is to just install the earlier release, which seems to be fine.

Thank you for the detailed information. Which method did you use to unpack the zip file, and did you download from the assets in the release?

I'm a bit puzzled as to what could have caused this for you (and the people above) since it seems fine both if I install it directly into Blender or when I unzip it with 7zip.

@svip
Copy link
Contributor

svip commented Aug 4, 2023

As two of the others in this issue, I am on Linux, where the path separator is /. I did not use a particularly fancy way to open the ZIP file, I just used the default archive manager that comes with XFCE. You might want to attempt if you can open it with Windows' basic archive manager (circumventing 7zip). My assumption is that Blender simply relies on whatever unzip-program is installed, hence why there are also people on Windows with this issue (and why you are not seeing it, as it probably relies on 7zip in your case).

But how zip.ps1 managed to create such a ZIP file is beyond me. The files I've been producing with Linux' zip-command have been successful, though Blender cannot find the generated module, so I am kind of stuck in building myself. I tried searching online, but I cannot see others having issues like that with [io.compression.zipfile]::CreateFromDirectory. If you are able to view the problematic ZIP file, maybe attempt to simply build another? Or try a different compression level?

@Candoran2
Copy link
Member

As two of the others in this issue, I am on Linux, where the path separator is /. I did not use a particularly fancy way to open the ZIP file, I just used the default archive manager that comes with XFCE. You might want to attempt if you can open it with Windows' basic archive manager (circumventing 7zip). My assumption is that Blender simply relies on whatever unzip-program is installed, hence why there are also people on Windows with this issue (and why you are not seeing it, as it probably relies on 7zip in your case).

But how zip.ps1 managed to create such a ZIP file is beyond me. The files I've been producing with Linux' zip-command have been successful, though Blender cannot find the generated module, so I am kind of stuck in building myself. I tried searching online, but I cannot see others having issues like that with [io.compression.zipfile]::CreateFromDirectory. If you are able to view the problematic ZIP file, maybe attempt to simply build another? Or try a different compression level?

The generated folder is something that can be generated using cobra-tools when you have the xml and new-pyffi. For the basic steps, see this comment: #566 (comment) (although you can now use this repository and don't need to use my specific branch of the addon).

Can you confirm the issue happens with this zip file?:
blender_niftools_addon-v0.1.0-2023-06-20-43341a10.zip

Opening it with the regular windows file explorer seems fine.

@svip
Copy link
Contributor

svip commented Aug 4, 2023

Thank you for the pointer on the generated directory.

As for the ZIP file, yes, it still maintains the path issue. As you can see here:
Screenshot_2023-08-04_21-00-20

According to this SO answer, you could attempt to inspect the file with a Perl script called zipdetails.

Edit: Here is someone having the same issue. (Kind of, they are trying to fix the ZIP file, but it definitely appears to be an incorrect ZIP file, that Windows archive managers apparently deals with.)

@Candoran2
Copy link
Member

Could you try this one?:

blender_niftools_addon-v0.1.1-2023-08-04-09536eaa.zip

I have made an adjustment to zip.ps1, and from a cursory glance it uses forward path separators.

@svip
Copy link
Contributor

svip commented Aug 4, 2023

This one looks correct.

image

Thank you. Let's hope it doesn't resurface.

Candoran2 added a commit to Candoran2/blender_nif_plugin that referenced this issue Aug 4, 2023
@Candoran2
Copy link
Member

Sweet. Thank you for testing this and providing the feedback. Without the initial comment I'd have no idea where to look.

@svip
Copy link
Contributor

svip commented Aug 4, 2023

You're welcome. I am personally motivated to make some modifications to this code base in the hope to support kf file export for Sid Meier's Pirates!. And it's great to see someone keeping the project alive.

@Candoran2 Candoran2 added this to To do in Plugin System via automation Aug 25, 2023
@Candoran2 Candoran2 moved this from To do to Done but not released in Plugin System Aug 25, 2023
@Candoran2 Candoran2 assigned Candoran2 and unassigned neomonkeus Aug 25, 2023
Plugin System automation moved this from Done but not released to Released Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issue with specific functionality not working as intended but overall plugin is working.
Projects
Plugin System
  
Released
Development

No branches or pull requests

6 participants