USB Solarpanel read current with python?
You cannot connect a voltage source directly to the USB data lines - USB is a complex digital communications system.

You would require an Analog to Digital converter (ADC) that could interface to USB, and connect your solar panel to the ADC analog input.