makehumancommunity / makehuman

This is the main repository for the MakeHuman application as such.
http://www.makehumancommunity.org
Other
1.18k stars 244 forks source link

Community - Download assets tab missing #207

Closed rwbaer closed 1 year ago

rwbaer commented 1 year ago

Nightly build windows: 20220719 alpha (HEAD:f8ff3bc5) As the issue title says the download assets tab is completely gone. Checking settings shows all boxes checked.

` Could not load 8_asset_downloader Traceback (most recent call last): File "./core\mhmain.py", line 585, in loadPlugin module.load(self) File "C:\Program Files\makehuman-community\makehuman\plugins\8_asset_downloader__init.py", line 38, in load downloadView = category.addTask(AssetDownloadTaskView(category)) File "C:\Program Files\makehuman-community\makehuman\plugins\8_asset_downloader\assetdownload.py", line 72, in init self.assetdb = AssetDB(self) File "C:\Program Files\makehuman-community\makehuman\plugins\8_asset_downloader\assetdb.py", line 67, in init self._loadRemoteDB() File "C:\Program Files\makehuman-community\makehuman\plugins\8_asset_downloader\assetdb.py", line 92, in _loadRemoteDB self.remoteJson = json.load(f) File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64__init__.py", line 296, in load File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\init__.py", line 348, in loads File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\decoder.py", line 337, in decode File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\decoder.py", line 355, in raw_decode json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

`

pabu commented 1 year ago
Download_assets_tab

If the tab in the screenshot is what you are looking for, then It shows for me both when running nightly installer and when cloning git repo.

rwbaer commented 1 year ago

Yes. That's the tab. Can you confirm that your version is Nightly build windows: 20220719 alpha (HEAD:f8ff3bc5)? (Edit: never mind, I increased the image size and I can read that it is). Hmm... perhaps something went wrong with my install.

Are you on Windows 11? One other quick question, did you install for anyone or "just for me"?

rwbaer commented 1 year ago

Okay. I just tried again on my home computer and the Download assets tab shows up fine. Must have been a bad install somehow. Closing this issue.

rwbaer commented 1 year ago

20220720 alpha (HEAD:f8ff3bc5) I'm reopening.

On the same work computer that failed yesterday, the community tabe is still missing. I tried first to reunzip yesterdays and resintsall. Fail to see tab. I then downloaded a fresh nightly today (but apparently the same build) and got no tab again.

Like pabu, the install worked fine for one of my home computers. I try again on yet another work computer later. From logs warning:

Could not load 8_asset_downloader Traceback (most recent call last): File "./core\mhmain.py", line 585, in loadPlugin module.load(self) File "C:\Program Files\makehuman-community\makehuman\plugins\8_asset_downloader__init.py", line 38, in load downloadView = category.addTask(AssetDownloadTaskView(category)) File "C:\Program Files\makehuman-community\makehuman\plugins\8_asset_downloader\assetdownload.py", line 72, in init self.assetdb = AssetDB(self) File "C:\Program Files\makehuman-community\makehuman\plugins\8_asset_downloader\assetdb.py", line 67, in init self._loadRemoteDB() File "C:\Program Files\makehuman-community\makehuman\plugins\8_asset_downloader\assetdb.py", line 92, in _loadRemoteDB self.remoteJson = json.load(f) File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64__init__.py", line 296, in load File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\init__.py", line 348, in loads File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\decoder.py", line 337, in decode File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\decoder.py", line 355, in raw_decode json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

It looks like it might be trying to access my local python for some reason? instead of the makehuman python? Any idea why? BTW, this machine does not have a D: drive so that python path may associate with the build machine.

pabu commented 1 year ago

I have never seen the Makehuman code before so I am mostly guessing here based on your output and skimming the referenced files in your error log. Hopefully this information helps you to further investigate your problem.

You get an exception when Makehuman tries to parse a local file named "remote.json" which should reside in a directory determined by the expression mhapi.locations.getUserDataPath("community-assets"). There is a check to determine if the file exists at all which passes. So provided that the check is not broken, the file probably exists but is empty. Line 84 in assetdb.py logs with level "debug" the local path of "remote.json". So provided that you have a log output level set so that you can see messages with level "debug", you should see something like "Remote json local path xxxx" in your log.

Best of luck with the bug hunting!

rwbaer commented 1 year ago

So, I think pabu is essentially right (although I used a hammer instead of finesse). I deleted my "C:\Users\%USERNAME%"\Documents\makehuman" folder and upon restarting, MH noticed the missing assetDB and created everything again. THe community downloadassets tab is back. It seems unfortunate that corruption of the database is not handled a little more gently, but since this is the only time I've seen it starting over is not a disaster.

Closing the issue a second time.