def get_gc_book(self):
if not self.gc_book:<EOL><INDENT>gc_db = self.config.get(ConfigKeys.gnucash_book_path)<EOL>if not gc_db:<EOL><INDENT>raise AttributeError("<STR_LIT>")<EOL><DEDENT>if not os.path.isabs(gc_db):<EOL><INDENT>gc_db = resource_filename(<EOL>Requirement.parse("<STR_LIT>"), gc_db)<EOL>if not os.path.exists(gc_db):<EOL><INDENT>raise ValueError(f"<STR_LIT>")<EOL><DEDENT><DEDENT>self.gc_book = open_book(gc_db, open_if_lock=True)<EOL><DEDENT>return self.gc_book<EOL>
Returns the GnuCash db session