ubuntu下jupiter報錯問題

因爲ubuntu的電源管理有問題,致使筆記本風扇老轉,又吵又耗電。搜了一通,發現安裝jupiter能夠解決。 html

個人系統是12.04,jupiter是0.1.9,不過有點小小的問題: python

~$ jupiter
Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 504, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/bin/jupiter", line 414, in update_screen_resolutions
    res = self.jupiter.get_available_resolutions(display)
  File "/usr/bin/jupiter", line 181, in get_available_resolutions
    return self.get_device('/available_resolutions_' + args,'resolutions','modes ' + args).split(' ')
AttributeError: 'bool' object has no attribute 'split'

Exception in thread Thread-5:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 504, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/bin/jupiter", line 380, in update_screen_orientations
    rotation = self.jupiter.current_rotation(display)
  File "/usr/bin/jupiter", line 166, in current_rotation
    return self.get_device('/rotation_saved_'+args, 'rotate', ['normal',args]).split(' ')[0]
AttributeError: 'bool' object has no attribute 'split'
再搜了一通誤解過,只好調試了一通,發現176行的函數def get_displays(self)返回的值有問題,包含空的元素,而後

update_screen_resolutions、get_available_resolutions、current_rotation等函數就會出錯 shell

就把錯誤的函數: bootstrap

def get_displays(self):
    return self.get_device('/displays','vga-out','mon').split(' ')

改爲了: ubuntu

def get_displays(self):
    return filter(None, self.get_device('/displays','vga-out','mon').split(' '))
至於那個filter爲何能夠去空元素,別問!仍是搜索來的,其實我只是半個伸手黨。具體本身看python文檔,build-in函數裏。
相關文章
相關標籤/搜索