Robot-Will / Stino

A Sublime Text Plugin for Arduino
Other
1.58k stars 249 forks source link

Exception when building in print_size #247

Closed hunnybear closed 9 years ago

hunnybear commented 9 years ago

It looks like something in my prefs isn't getting fully set, or the prefs for whatever I have set are not complete, I get this exception when I try to Upload and when I try to Verify/Compile:

Exception in thread Thread-3:
Traceback (most recent call last):
  File ".\threading.py", line 532, in __bootstrap_inner
  File ".\threading.py", line 484, in run
  File "./stino/pyarduino/arduino_compiler.py", line 84, in start_build
  File "./stino/pyarduino/arduino_compiler.py", line 372, in show_size_info
  File "./stino/pyarduino/arduino_compiler.py", line 379, in print_size
  File ".\re.py", line 190, in compile
  File ".\re.py", line 241, in _compile
TypeError: first argument must be string or compiled pattern

The function in arduino_compiler.py is here:

 def print_size(self, text):
        size_total = int(self.params.get('upload.maximum_size'))
        size_data_total = int(self.params.get('upload.maximum_data_size'))

        size_regex = self.params.get('recipe.size.regex')
        pattern = re.compile(size_regex, re.M)

I did some print debugging and it turns out that the key ('upload.maximum_size' ) never seems to get set in params.

Any ideas? am I just not setting something up properly?

also, here is the contents of my config file:

{
    "arduino_ide_path": "/usr/share/arduino", 
    "big_project": false, 
    "build_path": "/home/tyler/Arduino", 
    "lang_id": "en", 
    "serial_port": "/dev/ttyACM0", 
    "sketchbook_path": "/home/tyler/Arduino", 
    "target_board_id": "ide.arduino.avr.uno", 
    "target_programmer_id": "ide.arduino.avr.avrisp"
}