ladybug-tools / ladybug-blender

:beetle: :orange_book: Ladybug plugin for Blender
GNU General Public License v3.0
47 stars 9 forks source link

Error `ImplicitConversionProhibited` #37

Open KatiaFugazza opened 2 years ago

KatiaFugazza commented 2 years ago

Need help. I installed ladybug today in blender and I'm trying to do a solar study, but even without the *epw file it gives an error. Captura de tela 2022-09-25 161903

Durman commented 2 years ago

I can't find a link to Ladybug Tools. From where did you download it?

Asloric commented 2 years ago

I can't find a link to Ladybug Tools. From where did you download it?

You can find versions on this page. The one and only download source I could find. https://blenderbim.org/builds/

Durman commented 2 years ago

It's difficult to suggest anything without add-on documentation. The problem is that it does not know how to convert data from File type to LB type. I guess that the node does not know how to work with data from the File Path node without conversion. I think you have to past the pass directly into the property of the socket.

mostaphaRoudsari commented 2 years ago

Is there a more specific error with the line number? That might be helpful.

Durman commented 2 years ago

2022-09-30 08:13:34,116 [ERROR] sverchok.core.socket_conversions:156 : Implicit conversion from socket type SvFilePathSocket to socket type SvLBSocket is not supported for socket _epw_file of node LB Import EPW. Please use explicit conversion nodes.
Traceback (most recent call last):
  File "\sverchok\core\update_system.py", line 462, in main_update
    prepare_input_data(prev_socks, node.inputs)
  File "\sverchok\core\update_system.py", line 725, in prepare_input_data
    data = implicit_conversion.convert(ns, ps, data)
  File "\sverchok\core\socket_conversions.py", line 209, in convert
    super().convert(to_sock, from_sock, source_data)
  File "\sverchok\core\socket_conversions.py", line 156, in convert
    raise ImplicitConversionProhibited(socket)
sverchok.core.sv_custom_exceptions.ImplicitConversionProhibited: Implicit conversion from socket type SvFilePathSocket to socket type SvLBSocket is not supported for socket _epw_file of node LB Import EPW. Please use explicit conversion nodes.
mostaphaRoudsari commented 2 years ago

Thank you, @Durman - this is on the Sverchok side and I don't know how it works. Maybe @Moult can give you some direction here.

Durman commented 2 years ago

I already explained the logic of the error. It's to LB developers to decide how to fix.

It's difficult to suggest anything without add-on documentation. The problem is that it does not know how to convert data from File type to LB type. I guess that the node does not know how to work with data from the File Path node without conversion. I think you have to past the pass directly into the property of the socket.

mostaphaRoudsari commented 2 years ago

Sorry! I missed your comment there. Yes. The inputs expects a string with the path to the file and not a File object.

CyrilWaechter commented 1 year ago

As a temporary workaround you can replace SvLBSocket by SvFilePathSocket in LB_Import_EPW.py line 17

As LB_Import_EPW node is auto-generated from generate_nodes.py I don't know yet how to fix it but I have 2 ideas:

Andrej730 commented 6 months ago

Fixed after #44 by specifying lenient conversion type for sockets (https://github.com/ladybug-tools/ladybug-blender/commit/5e5e11538ccf690b3030cfb4d7d47220551c4fca)