question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Windows is not supported?

See original GitHub issue

I am using this torch file (https://s3.amazonaws.com/xunhuang-public/adain/vgg_normalised.t7) and is using the following line of code to load it:

t7 = torchfile.load(t7_file, force_8bytes_long=False)

Looks like it works in Linux, but it doesn’t work in Windows. Error message is:

    t7 = torchfile.load(t7_file, force_8bytes_long=False)
  File "C:\Program Files\Python36\lib\site-packages\torchfile.py", line 424, in load
    return reader.read_obj()
  File "C:\Program Files\Python36\lib\site-packages\torchfile.py", line 370, in read_obj
    obj._obj = self.read_obj()
  File "C:\Program Files\Python36\lib\site-packages\torchfile.py", line 385, in read_obj
    k = self.read_obj()
  File "C:\Program Files\Python36\lib\site-packages\torchfile.py", line 386, in read_obj
    v = self.read_obj()
  File "C:\Program Files\Python36\lib\site-packages\torchfile.py", line 370, in read_obj
    obj._obj = self.read_obj()
  File "C:\Program Files\Python36\lib\site-packages\torchfile.py", line 387, in read_obj
    obj[k] = v
TypeError: unhashable type: 'list'

Looks like something is wrong here? How should I fix it?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
Dunimoncommented, Dec 20, 2018

I tried to load the same model (https://s3.amazonaws.com/xunhuang-public/adain/vgg_normalised.t7) with the command

 torch_model = torchfile.load(t7_file, force_8bytes_long=True)

and it seems working on windows. Honestly, I don’t know what the parameters force_8bytes_long is really related to. I mean, the size of the long type is 8 bytes and (do not hesitate to tell me if I’m wrong) that’s the case for any languages (lua, python etc…). There is no full documentation (not yet I think) of torchfile libary but we can try figure out what is going on (https://github.com/bshillingford/python-torchfile).

3reactions
xiaoyongzhucommented, Nov 30, 2017

@bshillingford Thanks for the reply! I have turned off it:

    t7 = torchfile.load(t7_file, force_8bytes_long=False, use_list_heuristic = False)

However there’s still some problem:

    obj._obj = self.read_obj()
  File "C:\Program Files\Python36\lib\site-packages\torchfile.py", line 385, in read_obj
    k = self.read_obj()
  File "C:\Program Files\Python36\lib\site-packages\torchfile.py", line 386, in read_obj
    v = self.read_obj()
  File "C:\Program Files\Python36\lib\site-packages\torchfile.py", line 370, in read_obj
    obj._obj = self.read_obj()
  File "C:\Program Files\Python36\lib\site-packages\torchfile.py", line 387, in read_obj
    obj[k] = v
TypeError: unhashable type: 'numpy.ndarray'

which is in the same line.

Looks like it’s still not working. BTW - the same piece of code and data can work in Ubuntu, but not in Windows, so i suspect it’s something related with the OS.

Read more comments on GitHub >

github_iconTop Results From Across the Web

End of support for Windows 7 and Windows 8.1 - Microsoft
No. Support for Windows 8.1 is discontinued, but the software will continue to function. However, after January 10, 2023, your computer running Windows...
Read more >
Windows 10 support ends in 4 years, but this is what you ...
But if you're still using Microsoft's older OS, don't stress. Microsoft will continue to support Windows 10 until Oct. 14, 2025.
Read more >
How to Fix 'This version of this file is not compatible ... - Appuals
It can either be caused if the program is too old or too recent for the version of Windows that you are trying...
Read more >
Components not supported by Microsoft Windows 10 driver
Some components are not supported by Microsoft Windows 10 drivers due to already being End Of Life. When you upgrade to Windows 10,...
Read more >
It says my system is not supported – what do I do?
If you are running Windows, update your system. If you are running Mac, update your system. If you are running Linux or Google...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found