Getting re-started... python issue?
See original GitHub issueI had mpp-solar installed briefly a couple of months ago, but didn’t have time to pursue to completion.
Now I’m back to it. I pulled the latest using:
git clone https://github.com/jblance/mpp-solar.git cd mpp-solar sudo python ./setup.py install
That went fine.
sudo mpp-solar -h
gives me
[…]
MPP Solar Command Utility, version: 0.4.5
But now… mpp-solar -M LV5048 -d /dev/hidraw0 -l outputs:
Traceback (most recent call last):
File "/usr/local/bin/mpp-solar", line 11, in <module>
load_entry_point('mpp-solar==0.4.5', 'console_scripts', 'mpp-solar')()
File "/usr/local/lib/python2.7/dist-packages/mpp_solar-0.4.5-py2.7.egg/mppsolar/__init__.py", line 50, in main
mp = mppUtils(args.device, args.baud, args.model)
File "/usr/local/lib/python2.7/dist-packages/mpp_solar-0.4.5-py2.7.egg/mppsolar/mpputils.py", line 31, in __init__
self.inverter = mppInverter(serial_device, baud_rate, inverter_model)
File "/usr/local/lib/python2.7/dist-packages/mpp_solar-0.4.5-py2.7.egg/mppsolar/mppinverter.py", line 146, in __init__
self._commands = getCommandsFromJson(inverter_model)
File "/usr/local/lib/python2.7/dist-packages/mpp_solar-0.4.5-py2.7.egg/mppsolar/mppinverter.py", line 100, in getCommandsFromJson
help=getDataValue(data, 'help'), crc_function=getDataValue(data, 'crc'), prefix=getDataValue(data, 'prefix'), protocol=protocol))
File "/usr/local/lib/python2.7/dist-packages/mpp_solar-0.4.5-py2.7.egg/mppsolar/mppcommand.py", line 124, in __init__
self.byte_command = get_byte_command(self.cmd_str, self.crc_function)
File "/usr/local/lib/python2.7/dist-packages/mpp_solar-0.4.5-py2.7.egg/mppsolar/mppcommand.py", line 78, in get_byte_command
byte_cmd = bytes(cmd, 'utf-8')
TypeError: str() takes at most 1 argument (2 given)
Do I have a python problem here? Any help appreciated.
Issue Analytics
- State:
- Created 3 years ago
- Comments:41 (7 by maintainers)
Top Results From Across the Web
Issue 34258: Python shell keeps restarting - Issue Tracker
I was writing a code for my test in idle python.When i run the module it's just keeps restarting. This is my code:...
Read more >Python IDLE is restarting without giving me an output
Buggy RESTART in Python occurs if the user subprocess crashes. This Crashes can come from a bug in your program (infinite loop that...
Read more >Python program keeps restarting itself, from the top, for no ...
The Problem: When I run this code... import os, ctypes, sys ### GET ADMIN PERMISSIONS ### def ask_admin(): answer = ctypes.windll.shell32.
Read more >How to Restart a Process in Python
You cannot restart a process in Python, instead you must create and start a new process with the same configuration.
Read more >Python Getting Started - W3Schools
Python Install. Many PCs and Macs will have python already installed. To check if you have python installed on a Windows PC, search...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Might have to… I know @jblance started removing support for Python2 some time ago. i am not skillful enough to know if anything needs to be changed updated for getting this to work properly or something to that effect. I am sure he will chime in…
Added data source. Cooking with gas! Thanks again for your help. Very glad to be finally logging both sides of my inverter. Much appreciated!