Skip to content

Instantly share code, notes, and snippets.

@clayote
Last active January 1, 2016 18:09
Show Gist options
  • Save clayote/8182301 to your computer and use it in GitHub Desktop.
Save clayote/8182301 to your computer and use it in GitHub Desktop.
Incomprehensible error in kivy.lang.Parser.
diff --git a/LiSE/gui/lise.kv b/LiSE/gui/lise.kv
index 47e953c..47eb80b 100644
--- a/LiSE/gui/lise.kv
+++ b/LiSE/gui/lise.kv
@@ -1,11 +1,6 @@
-# coding: utf-8
-# This file is part of LiSE, a framework for life simulation games.
-# Copyright (c) 2013 Zachary Spector, zacharyspector@gmail.com
-
#: import lisepathl LiSE.__path__
#: import solarized LiSE.gui.style.solarized
#: import _ LiSE.util.passthru
-
<ClosetLabel,ClosetButton>:
symbolic: False
font_name: sep.join([lisepathl[-1], "gui", "assets", "Entypo.ttf"]) if self.symbolic else "DroidSans"
@@ -53,15 +48,13 @@
text_size: root.size
pos_hint: {'x': 0, 'y': 0}
valign: "top"
-<TableContent,TableHeader,TableBody>:
- size_hint_y: None
<CharSheet>:
on_character: self.repop()
<CharSheetAdder>:
StackLayout:
Label:
size_hint_y: 0.05
- text: "Add an item to the character sheet"
+ text: _("Add an item to the character sheet")
TabbedPanel:
size_hint_y: 0.9
do_default_tab: False
@@ -70,27 +63,15 @@
TabbedPanel:
do_default_tab: False
TabbedPanelItem:
- id: table_thing_locations
- text: root.get_text(_('Thing Location'))
- StackLayout:
- Label:
- text: root.get_text(_("Pick things."))
- size_hint_y: 0.1
- ThingListView:
- id: table_thing_location_things
- charsheet: root.charsheet
- size_hint_y: 0.9
- TabbedPanelItem:
- id: table_thing_stats
- text: root.get_text(_('Thing Stat'))
- StackLayout:
+ id: table_thing
+ text: root.get_text(_('Thing'))
StackLayout:
size_hint_x: 0.5
Label:
text: root.get_text(_("Pick things."))
size_hint_y: 0.1
ThingListView:
- id: table_thing_stat_things
+ id: table_thing_things
charsheet: root.charsheet
size_hint_y: 0.3
StackLayout:
@@ -99,21 +80,22 @@
text: root.get_text(_("Pick stats of things."))
size_hint_y: 0.1
NounStatListView:
- id: table_thing_stat_stats
- nounitems: table_thing_stat_things.selection
+ id: table_thing_stats
+ specialitems: ["location"]
+ nounitems: table_thing_things.selection
charsheet: root.charsheet
size_hint_y: 0.8
StackLayout:
size_hint_y: 0.1
TextInput:
- id: table_thing_stat_new_stat_in
+ id: table_thing_new_stat_in
size_hint_x: 0.8
hint_text: root.get_text(_("New stat name"))
CSAddButton:
- id: table_thing_stat_new_stat_but
+ id: table_thing_new_stat_but
TabbedPanelItem:
- id: table_place_stats
- text: root.get_text(_('Place Stat'))
+ id: table_place
+ text: root.get_text(_('Place'))
StackLayout:
StackLayout:
size_hint_x: 0.5
@@ -121,7 +103,7 @@
text: root.get_text(_("Pick places."))
size_hint_y: 0.1
PlaceListView:
- id: table_place_stat_places
+ id: table_place_places
charsheet: root.charsheet
size_hint_y: 0.9
StackLayout:
@@ -130,20 +112,19 @@
text: root.get_text(_("Pick stats of places."))
size_hint_y: 0.1
NounStatListView:
- id: table_place_stat_stats
- nounitems: table_place_stat_places.selection
+ id: table_place_stats
+ nounitems: table_place_places.selection
size_hint_y: 0.8
StackLayout:
size_hint_y: 0.1
TextInput:
- id: table_place_stat_new_stat_in
+ id: table_place_new_stat_in
size_hint_x: 0.8
- hint_text: root.get_text(_("New stat name"))
- CSAddButton:
- id: table_thing_stat_new_stat_but
+ hint_text: root.get_text(_("New stat name")) CSAddButton:
+ id: table_place_new_stat_but
TabbedPanelItem:
- id: table_portal_locations
- text: root.get_text(_('Portal Location'))
+ id: table_portal
+ text: root.get_text(_('Portal'))
StackLayout:
StackLayout:
size_hint_x: 0.5
@@ -151,20 +132,7 @@
text: root.get_text(_("Pick portals."))
size_hint_y: 0.1
PortalListView:
- id: table_portal_location_portals
- charsheet: root.charsheet
- size_hint_y: 0.9
- TabbedPanelItem:
- id: table_portal_stats
- text: root.get_text(_('Portal Stat'))
- StackLayout:
- StackLayout:
- size_hint_x: 0.5
- Label:
- text: root.get_text(_("Pick portals."))
- size_hint_y: 0.1
- PortalListView:
- id: table_portal_stat_portals
+ id: table_portal_portals
charsheet: root.charsheet
size_hint_y: 0.9
StackLayout:
@@ -173,35 +141,35 @@
text: root.get_text(_("Pick stats of portals."))
size_hint_y: 0.1
NounStatListView:
- nounitems: table_portal_stat_portals.selection
+ nounitems: table_portal_portals.selection
size_hint_y: 0.8
StackLayout:
size_hint_y: 0.1
TextInput:
- id: table_portal_stat_portals_in
+ id: table_portal_stat_in
size_hint_x: 0.8
hint_text: root.get_text(_("New stat name"))
CSAddButton:
- id: table_portal_stat_portals_but
+ id: table_portal_stat_but
TabbedPanelItem:
- id: table_character_stats
+ id: table_character
text: root.get_text(_('Character Stat'))
StackLayout:
Label:
text: root.get_text(_("Pick stats of the character."))
size_hint_y: 0.1
StatListView:
- id: table_character_stat_stats
+ id: table_character_stats
charsheet: root.charsheet
size_hint_y: 0.8
StackLayout:
size_hint_y: 0.1
TextInput:
- id: table_portal_stat_stats_in
+ id: table_character_stats_in
size_hint_x: 0.8
hint_text: root.get_text(_("New stat name"))
CSAddButton:
- id: table_portal_stat_stats_but
+ id: table_character_stats_but
TabbedPanelItem:
text: root.get_text(_('Calendars'))
TabbedPanel:
@@ -471,6 +439,7 @@
pos_hint: {'top': 0.9}
size_hint: (0.9, 0.5)
<TableHeader>:
+ size_hint_y: None
canvas:
Color:
rgba: solarized["base02"]
@@ -483,6 +452,14 @@
bold: True
color: solarized["base00"]
text: root.text
+<TableContent,TableBody>:
+ size_hint_y: None
+<TableView>:
+ TableContent:
+ closet: root.character.closet
+<CharStatTableView>:
+ CharStatTableContent:
+ closet: root.character.closet
<TexPile>:
width: max([img.right for img in self.imgs]) if len(self.imgs) > 0 else 0
height: max([img.top for img in self.imgs]) if len(self.imgs) > 0 else 0
Traceback (most recent call last):
File "/usr/lib/python2.7/pdb.py", line 1314, in main
pdb._runscript(mainpyfile)
File "/usr/lib/python2.7/pdb.py", line 1233, in _runscript
self.run(statement)
File "/usr/lib/python2.7/bdb.py", line 400, in run
exec cmd in globals, locals
File "<string>", line 1, in <module>
File "main.py", line 33, in <module>
lise()
File "main.py", line 29, in lise
host_name='Physical').run()
File "/usr/local/lib/python2.7/dist-packages/Kivy-1.8.0_dev-py2.7-linux-x86_64.egg/kivy/app.py", line 709, in run
self.load_kv(filename=self.options.get('kv_file'))
File "/usr/local/lib/python2.7/dist-packages/Kivy-1.8.0_dev-py2.7-linux-x86_64.egg/kivy/app.py", line 530, in load_kv
root = Builder.load_file(filename)
File "/usr/local/lib/python2.7/dist-packages/Kivy-1.8.0_dev-py2.7-linux-x86_64.egg/kivy/lang.py", line 1386, in load_file
return self.load_string(data, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/Kivy-1.8.0_dev-py2.7-linux-x86_64.egg/kivy/lang.py", line 1432, in load_string
parser = Parser(content=string, filename=fn)
File "/usr/local/lib/python2.7/dist-packages/Kivy-1.8.0_dev-py2.7-linux-x86_64.egg/kivy/lang.py", line 993, in __init__
self.parse(content)
File "/usr/local/lib/python2.7/dist-packages/Kivy-1.8.0_dev-py2.7-linux-x86_64.egg/kivy/lang.py", line 1066, in parse
objects, remaining_lines = self.parse_level(0, lines)
File "/usr/local/lib/python2.7/dist-packages/Kivy-1.8.0_dev-py2.7-linux-x86_64.egg/kivy/lang.py", line 1162, in parse_level
level + 1, lines[i:], spaces)
File "/usr/local/lib/python2.7/dist-packages/Kivy-1.8.0_dev-py2.7-linux-x86_64.egg/kivy/lang.py", line 1162, in parse_level
level + 1, lines[i:], spaces)
File "/usr/local/lib/python2.7/dist-packages/Kivy-1.8.0_dev-py2.7-linux-x86_64.egg/kivy/lang.py", line 1162, in parse_level
level + 1, lines[i:], spaces)
File "/usr/local/lib/python2.7/dist-packages/Kivy-1.8.0_dev-py2.7-linux-x86_64.egg/kivy/lang.py", line 1162, in parse_level
level + 1, lines[i:], spaces)
File "/usr/local/lib/python2.7/dist-packages/Kivy-1.8.0_dev-py2.7-linux-x86_64.egg/kivy/lang.py", line 1162, in parse_level
level + 1, lines[i:], spaces)
File "/usr/local/lib/python2.7/dist-packages/Kivy-1.8.0_dev-py2.7-linux-x86_64.egg/kivy/lang.py", line 1215, in parse_level
if current_property[:3] == 'on_':
TypeError: 'NoneType' object has no attribute '__getitem__'
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> /usr/local/lib/python2.7/dist-packages/Kivy-1.8.0_dev-py2.7-linux-x86_64.egg/kivy/lang.py(1215)parse_level()
-> if current_property[:3] == 'on_':
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment