after_merge
stringlengths
28
79.6k
before_merge
stringlengths
20
79.6k
url
stringlengths
38
71
full_traceback
stringlengths
43
922k
traceback_type
stringclasses
555 values
def _get_aoe2_base(cls, gamedata): """ Create the aoe2-base modpack. """ modpack = Modpack("aoe2_base") mod_def = modpack.get_info() mod_def.set_version("1.0c") mod_def.set_uid(2000) mod_def.add_assets_to_load("data/*") cls.organize_nyan_objects(modpack, gamedata) cls.organiz...
def _get_aoe2_base(cls, gamedata): """ Create the aoe2-base modpack. """ modpack = Modpack("aoe2-base") mod_def = modpack.get_info() mod_def.set_version("1.0c") mod_def.set_uid(2000) mod_def.add_assets_to_load("data/*") cls.organize_nyan_objects(modpack, gamedata) cls.organiz...
https://github.com/SFTtech/openage/issues/1355
INFO [py] launching openage v0.4.1-377-g2be30ba76 INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] Y Should we call wine to determine an AOE installation? [Y/n] n Could not find any installation directory automatically. Please enter an AOE2 install path manually. /home/schatzi/nvme/Steam/steamapps/...
KeyError
def organize_nyan_objects(modpack, full_data_set): """ Put available nyan objects into a given modpack. """ created_nyan_files = {} # Access all raw API objects raw_api_objects = [] raw_api_objects.extend(full_data_set.pregen_nyan_objects.values()) for unit_line in full_data_set.unit_l...
def organize_nyan_objects(modpack, full_data_set): """ Put available nyan objects into a given modpack. """ created_nyan_files = {} # Access all raw API objects raw_api_objects = [] raw_api_objects.extend(full_data_set.pregen_nyan_objects.values()) for unit_line in full_data_set.unit_l...
https://github.com/SFTtech/openage/issues/1355
INFO [py] launching openage v0.4.1-377-g2be30ba76 INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] Y Should we call wine to determine an AOE installation? [Y/n] n Could not find any installation directory automatically. Please enter an AOE2 install path manually. /home/schatzi/nvme/Steam/steamapps/...
KeyError
def generate_modifiers(full_data_set, pregen_converter_group): """ Generate standard modifiers. :param full_data_set: GenieObjectContainer instance that contains all relevant data for the conversion process. :type full_data_set: ...dataformat.aoc.geni...
def generate_modifiers(full_data_set, pregen_converter_group): """ Generate standard modifiers. :param full_data_set: GenieObjectContainer instance that contains all relevant data for the conversion process. :type full_data_set: ...dataformat.aoc.geni...
https://github.com/SFTtech/openage/issues/1355
INFO [py] launching openage v0.4.1-377-g2be30ba76 INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] Y Should we call wine to determine an AOE installation? [Y/n] n Could not find any installation directory automatically. Please enter an AOE2 install path manually. /home/schatzi/nvme/Steam/steamapps/...
KeyError
def live_ability(converter_group, line, container_obj_ref, diff=None): """ Creates a patch for the Live ability of a line. :param converter_group: Group that gets the patch. :type converter_group: ...dataformat.converter_object.ConverterObjectGroup :param line: Unit/Building line that has the abili...
def live_ability(converter_group, line, container_obj_ref, diff=None): """ Creates a patch for the Live ability of a line. :param converter_group: Group that gets the patch. :type converter_group: ...dataformat.converter_object.ConverterObjectGroup :param line: Unit/Building line that has the abili...
https://github.com/SFTtech/openage/issues/1355
INFO [py] launching openage v0.4.1-377-g2be30ba76 INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] Y Should we call wine to determine an AOE installation? [Y/n] n Could not find any installation directory automatically. Please enter an AOE2 install path manually. /home/schatzi/nvme/Steam/steamapps/...
KeyError
def hp_upgrade(converter_group, line, value, operator, team=False): """ Creates a patch for the HP modify effect (ID: 0). :param converter_group: Tech/Civ that gets the patch. :type converter_group: ...dataformat.converter_object.ConverterObjectGroup :param line: Unit/Building line that has the abi...
def hp_upgrade(converter_group, line, value, operator, team=False): """ Creates a patch for the HP modify effect (ID: 0). :param converter_group: Tech/Civ that gets the patch. :type converter_group: ...dataformat.converter_object.ConverterObjectGroup :param line: Unit/Building line that has the abi...
https://github.com/SFTtech/openage/issues/1355
INFO [py] launching openage v0.4.1-377-g2be30ba76 INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] Y Should we call wine to determine an AOE installation? [Y/n] n Could not find any installation directory automatically. Please enter an AOE2 install path manually. /home/schatzi/nvme/Steam/steamapps/...
KeyError
def _get_aoe2_base(cls, gamedata): """ Create the aoe2-base modpack. """ modpack = Modpack("de2_base") mod_def = modpack.get_info() mod_def.set_version("TODO") mod_def.set_uid(2000) mod_def.add_assets_to_load("data/*") AoCModpackSubprocessor.organize_nyan_objects(modpack, gamedat...
def _get_aoe2_base(cls, gamedata): """ Create the aoe2-base modpack. """ modpack = Modpack("de2-base") mod_def = modpack.get_info() mod_def.set_version("TODO") mod_def.set_uid(2000) mod_def.add_assets_to_load("data/*") AoCModpackSubprocessor.organize_nyan_objects(modpack, gamedat...
https://github.com/SFTtech/openage/issues/1355
INFO [py] launching openage v0.4.1-377-g2be30ba76 INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] Y Should we call wine to determine an AOE installation? [Y/n] n Could not find any installation directory automatically. Please enter an AOE2 install path manually. /home/schatzi/nvme/Steam/steamapps/...
KeyError
def _get_aoe1_base(cls, gamedata): """ Create the aoe1-base modpack. """ modpack = Modpack("aoe1_base") mod_def = modpack.get_info() mod_def.set_version("1.0B") mod_def.set_uid(1000) mod_def.add_assets_to_load("data/*") AoCModpackSubprocessor.organize_nyan_objects(modpack, gameda...
def _get_aoe1_base(cls, gamedata): """ Create the aoe1-base modpack. """ modpack = Modpack("aoe1-base") mod_def = modpack.get_info() mod_def.set_version("1.0B") mod_def.set_uid(1000) mod_def.add_assets_to_load("data/*") AoCModpackSubprocessor.organize_nyan_objects(modpack, gameda...
https://github.com/SFTtech/openage/issues/1355
INFO [py] launching openage v0.4.1-377-g2be30ba76 INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] Y Should we call wine to determine an AOE installation? [Y/n] n Could not find any installation directory automatically. Please enter an AOE2 install path manually. /home/schatzi/nvme/Steam/steamapps/...
KeyError
def _get_swgb_base(cls, gamedata): """ Create the swgb-base modpack. """ modpack = Modpack("swgb_base") mod_def = modpack.get_info() mod_def.set_version("GOG") mod_def.set_uid(5000) mod_def.add_assets_to_load("data/*") AoCModpackSubprocessor.organize_nyan_objects(modpack, gamedat...
def _get_swgb_base(cls, gamedata): """ Create the swgb-base modpack. """ modpack = Modpack("swgb-base") mod_def = modpack.get_info() mod_def.set_version("GOG") mod_def.set_uid(5000) mod_def.add_assets_to_load("data/*") AoCModpackSubprocessor.organize_nyan_objects(modpack, gamedat...
https://github.com/SFTtech/openage/issues/1355
INFO [py] launching openage v0.4.1-377-g2be30ba76 INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] Y Should we call wine to determine an AOE installation? [Y/n] n Could not find any installation directory automatically. Please enter an AOE2 install path manually. /home/schatzi/nvme/Steam/steamapps/...
KeyError
def expand_from_file(self, nyan_file): """ Expands the tree from a nyan file. :param nyan_file: File with nyan objects. :type nyan_file: .convert.export.formats.nyan_file.NyanFile """ current_node = self.root fqon = nyan_file.get_fqon() node_type = NodeType.FILESYS for node_str in ...
def expand_from_file(self, nyan_file): """ Expands the tree from a nyan file. :param nyan_file: File with nyan objects. :type nyan_file: .convert.export.formats.nyan_file.NyanFile """ # Process fqon of the file current_node = self.root fqon = nyan_file.get_fqon() node_type = NodeTyp...
https://github.com/SFTtech/openage/issues/1355
INFO [py] launching openage v0.4.1-377-g2be30ba76 INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] Y Should we call wine to determine an AOE installation? [Y/n] n Could not find any installation directory automatically. Please enter an AOE2 install path manually. /home/schatzi/nvme/Steam/steamapps/...
KeyError
def get_alias_fqon(self, fqon, namespace=None): """ Find the (shortened) fqon by traversing the tree to the fqon node and then going upwards until an alias is found. :param fqon: Object reference for which an alias should be found. :type fqon: tuple :param namespace: Identifier of a namespace. ...
def get_alias_fqon(self, fqon): """ Find the (shortened) fqon by traversing the tree to the fqon node and then going upwards until a marked node is found. """ # Traverse the tree downwards current_node = self.root for part in fqon: current_node = current_node.get_child(part) # T...
https://github.com/SFTtech/openage/issues/1355
INFO [py] launching openage v0.4.1-377-g2be30ba76 INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] Y Should we call wine to determine an AOE installation? [Y/n] n Could not find any installation directory automatically. Please enter an AOE2 install path manually. /home/schatzi/nvme/Steam/steamapps/...
KeyError
def __init__(self, name, node_type, parent): """ Create a node for an import tree. :param name: Name of the node. :type name: str :param node_type: Type of the node. :type node_type: NodeType :param parent: Parent node of this node. :type parent: Node """ self.name = name s...
def __init__(self, name, node_type, parent): """ Create a node for an import tree. :param name: Name of the node. :type name: str :param node_type: Type of the node. :type node_type: NodeType :param parent: Parent node of this node. :type parent: Node """ self.name = name s...
https://github.com/SFTtech/openage/issues/1355
INFO [py] launching openage v0.4.1-377-g2be30ba76 INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] Y Should we call wine to determine an AOE installation? [Y/n] n Could not find any installation directory automatically. Please enter an AOE2 install path manually. /home/schatzi/nvme/Steam/steamapps/...
KeyError
def mark(self): """ Mark this node as an alias node. """ self.marked = True
def mark(self): """ Mark this node as an alias node. """ self.alias = True
https://github.com/SFTtech/openage/issues/1355
INFO [py] launching openage v0.4.1-377-g2be30ba76 INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] Y Should we call wine to determine an AOE installation? [Y/n] n Could not find any installation directory automatically. Please enter an AOE2 install path manually. /home/schatzi/nvme/Steam/steamapps/...
KeyError
def unmark(self): """ Unmark this node as an alias node. """ self.marked = False
def unmark(self): """ Unmark this node as an alias node. """ self.alias = False
https://github.com/SFTtech/openage/issues/1355
INFO [py] launching openage v0.4.1-377-g2be30ba76 INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] Y Should we call wine to determine an AOE installation? [Y/n] n Could not find any installation directory automatically. Please enter an AOE2 install path manually. /home/schatzi/nvme/Steam/steamapps/...
KeyError
def _prepare_object_content(self, indent_depth, import_tree=None): """ Returns a string containing the nyan object's content (members, nested objects). Subroutine of dump(). """ output_str = "" empty = True if len(self._inherited_members) > 0: for inherited_member in self._inhe...
def _prepare_object_content(self, indent_depth, import_tree=None): """ Returns a string containing the nyan object's content (members, nested objects). Subroutine of dump(). """ output_str = "" empty = True if len(self._inherited_members) > 0: for inherited_member in self._inhe...
https://github.com/SFTtech/openage/issues/1355
INFO [py] launching openage v0.4.1-377-g2be30ba76 INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] Y Should we call wine to determine an AOE installation? [Y/n] n Could not find any installation directory automatically. Please enter an AOE2 install path manually. /home/schatzi/nvme/Steam/steamapps/...
KeyError
def _prepare_inheritance_content(self, import_tree=None): """ Returns a string containing the nyan object's inheritance set in the header. Subroutine of dump(). """ output_str = "(" if len(self._parents) > 0: for parent in self._parents: if import_tree: ...
def _prepare_inheritance_content(self, import_tree=None): """ Returns a string containing the nyan object's inheritance set in the header. Subroutine of dump(). """ output_str = "(" if len(self._parents) > 0: for parent in self._parents: if import_tree: ...
https://github.com/SFTtech/openage/issues/1355
INFO [py] launching openage v0.4.1-377-g2be30ba76 INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] Y Should we call wine to determine an AOE installation? [Y/n] n Could not find any installation directory automatically. Please enter an AOE2 install path manually. /home/schatzi/nvme/Steam/steamapps/...
KeyError
def dump(self, indent_depth, import_tree=None, namespace=None): """ Returns the nyan string representation of the member. """ output_str = f"{self.name}" type_str = "" if isinstance(self._member_type, NyanObject): if import_tree: sfqon = ".".join( import_tre...
def dump(self, import_tree=None): """ Returns the nyan string representation of the member. """ output_str = f"{self.name}" type_str = "" if isinstance(self._member_type, NyanObject): if import_tree: sfqon = ".".join(import_tree.get_alias_fqon(self._member_type.get_fqon()))...
https://github.com/SFTtech/openage/issues/1355
INFO [py] launching openage v0.4.1-377-g2be30ba76 INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] Y Should we call wine to determine an AOE installation? [Y/n] n Could not find any installation directory automatically. Please enter an AOE2 install path manually. /home/schatzi/nvme/Steam/steamapps/...
KeyError
def dump_short(self, indent_depth, import_tree=None, namespace=None): """ Returns the nyan string representation of the member, but without the type definition. """ return "%s %s%s %s" % ( self.get_name(), "@" * self._override_depth, self._operator.value, self._get_st...
def dump_short(self, import_tree=None): """ Returns the nyan string representation of the member, but without the type definition. """ return "%s %s%s %s" % ( self.get_name(), "@" * self._override_depth, self._operator.value, self._get_str_representation(import_tree=i...
https://github.com/SFTtech/openage/issues/1355
INFO [py] launching openage v0.4.1-377-g2be30ba76 INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] Y Should we call wine to determine an AOE installation? [Y/n] n Could not find any installation directory automatically. Please enter an AOE2 install path manually. /home/schatzi/nvme/Steam/steamapps/...
KeyError
def _get_primitive_value_str( self, member_type, value, import_tree=None, namespace=None ): """ Returns the nyan string representation of primitive values. Subroutine of _get_str_representation() """ if member_type in (MemberType.TEXT, MemberType.FILE): return f'"{value}"' elif isi...
def _get_primitive_value_str(self, member_type, value, import_tree=None): """ Returns the nyan string representation of primitive values. Subroutine of _get_str_representation() """ if member_type is MemberType.FLOAT: return f"{value}f" elif member_type in (MemberType.TEXT, MemberType....
https://github.com/SFTtech/openage/issues/1355
INFO [py] launching openage v0.4.1-377-g2be30ba76 INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] Y Should we call wine to determine an AOE installation? [Y/n] n Could not find any installation directory automatically. Please enter an AOE2 install path manually. /home/schatzi/nvme/Steam/steamapps/...
KeyError
def _get_str_representation(self, indent_depth, import_tree=None, namespace=None): """ Returns the nyan string representation of the value. """ if not self.is_initialized(): return f"UNINITIALIZED VALUE {self.__repr__()}" if self._optional and self.value is MemberSpecialValue.NYAN_NONE: ...
def _get_str_representation(self, import_tree=None): """ Returns the nyan string representation of the value. """ if not self.is_initialized(): return f"UNINITIALIZED VALUE {self.__repr__()}" if self._optional and self.value is MemberSpecialValue.NYAN_NONE: return MemberSpecialValue...
https://github.com/SFTtech/openage/issues/1355
INFO [py] launching openage v0.4.1-377-g2be30ba76 INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] Y Should we call wine to determine an AOE installation? [Y/n] n Could not find any installation directory automatically. Please enter an AOE2 install path manually. /home/schatzi/nvme/Steam/steamapps/...
KeyError
def dump(self, indent_depth, import_tree=None, namespace=None): """ Returns the string representation of the member. """ return self.dump_short(indent_depth, import_tree=import_tree, namespace=namespace)
def dump(self, import_tree=None): """ Returns the string representation of the member. """ return self.dump_short(import_tree=import_tree)
https://github.com/SFTtech/openage/issues/1355
INFO [py] launching openage v0.4.1-377-g2be30ba76 INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] Y Should we call wine to determine an AOE installation? [Y/n] n Could not find any installation directory automatically. Please enter an AOE2 install path manually. /home/schatzi/nvme/Steam/steamapps/...
KeyError
def dump_short(self, indent_depth, import_tree=None, namespace=None): """ Returns the nyan string representation of the member, but without the type definition. """ return "%s %s%s %s" % ( self.get_name_with_origin(), "@" * self._override_depth, self._operator.value, ...
def dump_short(self, import_tree=None): """ Returns the nyan string representation of the member, but without the type definition. """ return "%s %s%s %s" % ( self.get_name_with_origin(), "@" * self._override_depth, self._operator.value, self._get_str_representation(i...
https://github.com/SFTtech/openage/issues/1355
INFO [py] launching openage v0.4.1-377-g2be30ba76 INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] Y Should we call wine to determine an AOE installation? [Y/n] n Could not find any installation directory automatically. Please enter an AOE2 install path manually. /home/schatzi/nvme/Steam/steamapps/...
KeyError
def convert_assets(assets, args, srcdir=None, prev_source_dir_path=None): """ Perform asset conversion. Requires original assets and stores them in usable and free formats. assets must be a filesystem-like object pointing at the game's asset dir. srcdir must be None, or point at some source direct...
def convert_assets(assets, args, srcdir=None, prev_source_dir_path=None): """ Perform asset conversion. Requires original assets and stores them in usable and free formats. assets must be a filesystem-like object pointing at the game's asset dir. srcdir must be None, or point at some source direct...
https://github.com/SFTtech/openage/issues/1350
INFO [py] launching openage v0.4.1-371-g0c6e704b INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] y Traceback (most recent call last): File "/app/bin/openage", line 15, in <module> main() File "/app/lib/python3.8/site-packages/openage/__main__.py", line 132, in main return args.entrypoint(args, cli...
AttributeError
def main(args, error): """CLI entry point""" del error # unused # initialize libopenage from ..cppinterface.setup import setup setup(args) # conversion source if args.source_dir is not None: srcdir = CaseIgnoringDirectory(args.source_dir).root else: srcdir = None ...
def main(args, error): """CLI entry point""" del error # unused # initialize libopenage from ..cppinterface.setup import setup setup(args) # conversion source if args.source_dir is not None: srcdir = CaseIgnoringDirectory(args.source_dir).root else: srcdir = None ...
https://github.com/SFTtech/openage/issues/1350
INFO [py] launching openage v0.4.1-371-g0c6e704b INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] y Traceback (most recent call last): File "/app/bin/openage", line 15, in <module> main() File "/app/lib/python3.8/site-packages/openage/__main__.py", line 132, in main return args.entrypoint(args, cli...
AttributeError
def main(args, error): """ Makes sure that the assets have been converted, and jumps into the C++ main method. """ del error # unused # we have to import stuff inside the function # as it depends on generated/compiled code from .main_cpp import run_game from .. import config fr...
def main(args, error): """ Makes sure that the assets have been converted, and jumps into the C++ main method. """ del error # unused # we have to import stuff inside the function # as it depends on generated/compiled code from .main_cpp import run_game from .. import config fr...
https://github.com/SFTtech/openage/issues/1350
INFO [py] launching openage v0.4.1-371-g0c6e704b INFO [py] compiled by GNU 10.2.0 Do you want to convert assets? [Y/n] y Traceback (most recent call last): File "/app/bin/openage", line 15, in <module> main() File "/app/lib/python3.8/site-packages/openage/__main__.py", line 132, in main return args.entrypoint(args, cli...
AttributeError
def main(): """CLI entry point""" args = parse_args() cppname = "libopenage" cppdir = Path(cppname).absolute() out_cppdir = Path(args.output_dir) / cppname if args.verbose: hdr_count = len(args.all_files) plural = "s" if hdr_count > 1 else "" print( "extract...
def main(): """CLI entry point""" args = parse_args() cppname = "libopenage" cppdir = Path(cppname).absolute() out_cppdir = Path(args.output_dir) / cppname if args.verbose: hdr_count = len(args.all_files) plural = "s" if hdr_count > 1 else "" print( "extract...
https://github.com/SFTtech/openage/issues/1093
% make pxdgen VERBOSE=1 /usr/bin/cmake -S/tmp/portage/games-strategy/openage-9999/work/openage-9999 -B/tmp/portage/games-strategy/openage-9999/work/openage-9999_build --check-build-system CMakeFiles/Makefile.cmake 0 make -f CMakeFiles/Makefile2 pxdgen make[1]: Entering directory '/tmp/portage/games-strategy/openage-999...
ValueError
def main(argv=None): """Top-level argparsing; invokes subparser for all submodules.""" cli = argparse.ArgumentParser( "openage", description=("free age of empires II engine clone") ) cli.add_argument( "--version", "-V", nargs=0, action=PrintVersion, help=...
def main(argv=None): """Top-level argparsing; invokes subparser for all submodules.""" cli = argparse.ArgumentParser( "openage", description=("free age of empires II engine clone") ) cli.add_argument( "--version", "-V", nargs=0, action=PrintVersion, help=...
https://github.com/SFTtech/openage/issues/853
dev@openage:~/openage$ python3 -m openage convert-file /home/dev/aoe1/data/Border.drs 20000.slp /home/dev/aoe1/data/test.png INFO opening slp in drs '/home/dev/aoe1/data/Border.drs:20000.slp'... INFO parsing slp image... INFO opening palette in drs '/home/dev/aoe1/data/interfac.drs:50500.bin'... INFO parsing palette da...
ValueError
def get_asset_path(custom_asset_dir=None): """ Returns a Path object for the game assets. `custom_asset_dir` can a custom asset directory, which is mounted at the top of the union filesystem (i.e. has highest priority). This function is used by the both the conversion process and the game star...
def get_asset_path(args): """ Returns a Path object for the game assets. args are the arguments, as provided by the CLI's ArgumentParser. """ # if we're in devmode, use only the build source asset folder if not args.asset_dir and config.DEVMODE: return Directory(os.path.join(config.BUI...
https://github.com/SFTtech/openage/issues/853
dev@openage:~/openage$ python3 -m openage convert-file /home/dev/aoe1/data/Border.drs 20000.slp /home/dev/aoe1/data/test.png INFO opening slp in drs '/home/dev/aoe1/data/Border.drs:20000.slp'... INFO parsing slp image... INFO opening palette in drs '/home/dev/aoe1/data/interfac.drs:50500.bin'... INFO parsing palette da...
ValueError
def interactive_browser(srcdir=None): """ launch an interactive view for browsing the original archives. """ info("launching interactive data browser...") # the variables are actually used, in the interactive prompt. # pylint: disable=unused-variable data, game_versions = mount_input(s...
def interactive_browser(srcdir=None): """ launch an interactive view for browsing the original archives. """ info("launching interactive data browser...") # the variable is actually used, in the interactive prompt. # pylint: disable=unused-variable data, game_versions = mount_input(src...
https://github.com/SFTtech/openage/issues/853
dev@openage:~/openage$ python3 -m openage convert-file /home/dev/aoe1/data/Border.drs 20000.slp /home/dev/aoe1/data/test.png INFO opening slp in drs '/home/dev/aoe1/data/Border.drs:20000.slp'... INFO parsing slp image... INFO opening palette in drs '/home/dev/aoe1/data/interfac.drs:50500.bin'... INFO parsing palette da...
ValueError
def save_slp(path, target, palette=None): """ save a slp as png. """ from .texture import Texture from .slp import SLP from .driver import get_palette if not palette: palette = get_palette(data) with path.open("rb") as slpfile: tex = Texture(SLP(slpfile.read()), palette...
def save_slp(path, target, palette=None): """ save a slp as png. """ from .texture import Texture from .slp import SLP from .driver import get_palette if not palette: palette = get_palette(data, game_versions) with path.open("rb") as slpfile: tex = Texture(SLP(slpfile.r...
https://github.com/SFTtech/openage/issues/853
dev@openage:~/openage$ python3 -m openage convert-file /home/dev/aoe1/data/Border.drs 20000.slp /home/dev/aoe1/data/test.png INFO opening slp in drs '/home/dev/aoe1/data/Border.drs:20000.slp'... INFO parsing slp image... INFO opening palette in drs '/home/dev/aoe1/data/interfac.drs:50500.bin'... INFO parsing palette da...
ValueError
def init_subparser(cli): """Initializes the parser for convert-specific args.""" cli.set_defaults(entrypoint=main) cli.add_argument("--source-dir", default=None, help="source data directory") cli.add_argument( "--output-dir", default=None, help="destination data output directory" ) cl...
def init_subparser(cli): """Initializes the parser for convert-specific args.""" cli.set_defaults(entrypoint=main) cli.add_argument("--source-dir", default=None, help="source data directory") cli.add_argument( "--force", action="store_true", help="force conversion, even if up-t...
https://github.com/SFTtech/openage/issues/853
dev@openage:~/openage$ python3 -m openage convert-file /home/dev/aoe1/data/Border.drs 20000.slp /home/dev/aoe1/data/test.png INFO opening slp in drs '/home/dev/aoe1/data/Border.drs:20000.slp'... INFO parsing slp image... INFO opening palette in drs '/home/dev/aoe1/data/interfac.drs:50500.bin'... INFO parsing palette da...
ValueError
def main(args, error): """CLI entry point""" del error # unused # initialize libopenage from ..cppinterface.setup import setup setup(args) # conversion source if args.source_dir is not None: srcdir = CaseIgnoringDirectory(args.source_dir).root else: srcdir = None ...
def main(args, error): """CLI entry point""" del error # unused # initialize libopenage from ..cppinterface.setup import setup setup(args) # conversion source if args.source_dir is not None: srcdir = CaseIgnoringDirectory(args.source_dir).root else: srcdir = None ...
https://github.com/SFTtech/openage/issues/853
dev@openage:~/openage$ python3 -m openage convert-file /home/dev/aoe1/data/Border.drs 20000.slp /home/dev/aoe1/data/test.png INFO opening slp in drs '/home/dev/aoe1/data/Border.drs:20000.slp'... INFO parsing slp image... INFO opening palette in drs '/home/dev/aoe1/data/interfac.drs:50500.bin'... INFO parsing palette da...
ValueError
def init_subparser(cli): """Initializes the parser for convert-specific args.""" import argparse cli.set_defaults(entrypoint=main) cli.add_argument("--palette", default="50500", help="palette number") cli.add_argument( "--interfac", type=argparse.FileType("rb"), help=( ...
def init_subparser(cli): """Initializes the parser for convert-specific args.""" cli.set_defaults(entrypoint=main) cli.add_argument("--palette", default="50500", help="palette number") cli.add_argument( "--interfac", help=("drs archive where palette is contained (interfac.drs)") ) cli.a...
https://github.com/SFTtech/openage/issues/853
dev@openage:~/openage$ python3 -m openage convert-file /home/dev/aoe1/data/Border.drs 20000.slp /home/dev/aoe1/data/test.png INFO opening slp in drs '/home/dev/aoe1/data/Border.drs:20000.slp'... INFO parsing slp image... INFO opening palette in drs '/home/dev/aoe1/data/interfac.drs:50500.bin'... INFO parsing palette da...
ValueError
def main(args, error): """CLI entry point for single file conversions""" del error # unused drspath = Path(args.drs.name) outputpath = Path(args.output) if args.interfac: interfacfile = args.interfac else: # if no interfac was given, assume # the same path of the drs a...
def main(args, error): """CLI entry point for single file conversions""" del error # unused if args.interfac: interfacfile = args.interfac else: # if no interfac was given, assume # the same path of the drs archive. drspath = os.path.split(args.drs)[0] interfacf...
https://github.com/SFTtech/openage/issues/853
dev@openage:~/openage$ python3 -m openage convert-file /home/dev/aoe1/data/Border.drs 20000.slp /home/dev/aoe1/data/test.png INFO opening slp in drs '/home/dev/aoe1/data/Border.drs:20000.slp'... INFO parsing slp image... INFO opening palette in drs '/home/dev/aoe1/data/interfac.drs:50500.bin'... INFO parsing palette da...
ValueError
def save(self, targetdir, filename, meta_formats=None): """ Store the image data into the target directory path, with given filename="dir/out.png" If metaformats are requested, export e.g. as "dir/out.docx". """ if not isinstance(targetdir, Path): raise ValueError("util.fslike Path expec...
def save(self, targetdir, filename, meta_formats=None): """ Store the image data into the target directory path, with given filename="dir/out.png" If metaformats are requested, export e.g. as "dir/out.docx". """ if not isinstance(targetdir, Path): raise ValueError("util.fslike Path expec...
https://github.com/SFTtech/openage/issues/853
dev@openage:~/openage$ python3 -m openage convert-file /home/dev/aoe1/data/Border.drs 20000.slp /home/dev/aoe1/data/test.png INFO opening slp in drs '/home/dev/aoe1/data/Border.drs:20000.slp'... INFO parsing slp image... INFO opening palette in drs '/home/dev/aoe1/data/interfac.drs:50500.bin'... INFO parsing palette da...
ValueError
def get_config_path(custom_cfg_dir=None): """ Locates the main configuration file by name in some searchpaths. Optionally, mount a custom directory with highest priority. """ # if we're in devmode, use only the build source config folder if config.DEVMODE: return Directory(os.path.join(...
def get_config_path(args): """ Locates the main configuration file by name in some searchpaths. """ # if we're in devmode, use only the build source config folder if config.DEVMODE: return Directory(os.path.join(config.BUILD_SRC_DIR, "cfg")).root # else, mount the possible locations in...
https://github.com/SFTtech/openage/issues/853
dev@openage:~/openage$ python3 -m openage convert-file /home/dev/aoe1/data/Border.drs 20000.slp /home/dev/aoe1/data/test.png INFO opening slp in drs '/home/dev/aoe1/data/Border.drs:20000.slp'... INFO parsing slp image... INFO opening palette in drs '/home/dev/aoe1/data/interfac.drs:50500.bin'... INFO parsing palette da...
ValueError
def main(args, error): """ Makes sure that the assets have been converted, and jumps into the C++ main method. """ del error # unused # we have to import stuff inside the function # as it depends on generated/compiled code from .main_cpp import run_game from .. import config fr...
def main(args, error): """ Makes sure that the assets have been converted, and jumps into the C++ main method. """ del error # unused # we have to import stuff inside the function # as it depends on generated/compiled code from .main_cpp import run_game from .. import config fr...
https://github.com/SFTtech/openage/issues/853
dev@openage:~/openage$ python3 -m openage convert-file /home/dev/aoe1/data/Border.drs 20000.slp /home/dev/aoe1/data/test.png INFO opening slp in drs '/home/dev/aoe1/data/Border.drs:20000.slp'... INFO parsing slp image... INFO opening palette in drs '/home/dev/aoe1/data/interfac.drs:50500.bin'... INFO parsing palette da...
ValueError
def get_string_resources(args): """reads the (language) string resources""" from .stringresource import StringResource stringres = StringResource() srcdir = args.srcdir count = 0 # AoK:TC uses .DLL PE files for its string resources, # HD uses plaintext files if GameVersion.age2_fe in ...
def get_string_resources(args): """reads the (language) string resources""" from .stringresource import StringResource stringres = StringResource() srcdir = args.srcdir count = 0 # AoK:TC uses .DLL PE files for its string resources, # HD uses plaintext files if srcdir["language.dll"]....
https://github.com/SFTtech/openage/issues/461
$ make run ./run game INFO [py] No converted assets have been found media conversion is required. please provide your AoE II installation dir: /media/niklas/E4DE307EDE304AD6/Program Files (x86)/Steam/SteamApps/common/Age2HD INFO [py] Game version(s) detected: Age of Empires 2: HD Edition (Version 3.x); Forgotten Empire...
Exception
def get_domain_mx_list(domain): """Return a list of MX IP address for domain.""" result = [] logger = logging.getLogger("modoboa.admin") dns_server = param_tools.get_global_parameter("custom_dns_server") if dns_server: resolver = dns.resolver.Resolver() resolver.nameservers = [dns_se...
def get_domain_mx_list(domain): """Return a list of MX IP address for domain.""" result = [] logger = logging.getLogger("modoboa.admin") dns_server = param_tools.get_global_parameter("custom_dns_server") if dns_server: resolver = dns.resolver.Resolver() resolver.nameservers = [dns_se...
https://github.com/modoboa/modoboa/issues/1596
Traceback (most recent call last): File "/srv/modoboa/env3/lib/python3.5/site-packages/dns/resolver.py", line 215, in __init__ rdclass, rdtype) File "/srv/modoboa/env3/lib/python3.5/site-packages/dns/message.py", line 352, in find_rrset raise KeyError KeyError During handling of the above exception, another exception ...
KeyError
def authenticate(self, request, username=None, password=None): """Check the username/password and return a User.""" host = getattr(settings, "AUTH_SMTP_SERVER_ADDRESS", "localhost") port = getattr(settings, "AUTH_SMTP_SERVER_PORT", 25) secured_mode = getattr(settings, "AUTH_SMTP_SECURED_MODE", None) ...
def authenticate(self, username=None, password=None): """Check the username/password and return a User.""" host = getattr(settings, "AUTH_SMTP_SERVER_ADDRESS", "localhost") port = getattr(settings, "AUTH_SMTP_SERVER_PORT", 25) secured_mode = getattr(settings, "AUTH_SMTP_SECURED_MODE", None) if secur...
https://github.com/modoboa/modoboa/issues/1510
Internal Server Error: /accounts/login/ Traceback (most recent call last): File "/srv/modoboa/env/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner response = get_response(request) File "/srv/modoboa/env/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_respons...
TypeError
def authenticate(self, *args, **kwargs): if self.global_params["authentication_type"] == "ldap": return super(LDAPBackend, self).authenticate(*args, **kwargs) return None
def authenticate(self, username, password): if self.global_params["authentication_type"] == "ldap": return super(LDAPBackend, self).authenticate( username=username, password=password ) return None
https://github.com/modoboa/modoboa/issues/1510
Internal Server Error: /accounts/login/ Traceback (most recent call last): File "/srv/modoboa/env/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner response = get_response(request) File "/srv/modoboa/env/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_respons...
TypeError
def handle(self, *args, **options): exts_pool.load_all() self.csvwriter = csv.writer(self.stdout, delimiter=smart_text(options["sepchar"])) getattr(self, "export_{}".format(options["objtype"]))()
def handle(self, *args, **options): exts_pool.load_all() self.csvwriter = csv.writer(sys.stdout, delimiter=options["sepchar"]) getattr(self, "export_{}".format(options["objtype"]))()
https://github.com/modoboa/modoboa/issues/1483
Traceback (most recent call last): File "manage.py", line 22, in <module> execute_from_command_line(sys.argv) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line utility.execute() File "/srv/modoboa/env/local/lib/python2.7/site-packages/dj...
TypeError
def ready(self): load_core_settings() # Import these to force registration of checks and signals from . import checks # noqa:F401 from . import handlers signals.post_migrate.connect(handlers.create_local_config, sender=self)
def ready(self): load_core_settings() from . import handlers signals.post_migrate.connect(handlers.create_local_config, sender=self)
https://github.com/modoboa/modoboa/issues/1086
Traceback (most recent call last): File "/srv/modoboa/instance/manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/srv/modoboa/env/local/lib/python2.7/site-packages/Django-1.9.12-py2.7.egg/django/core/management/__init__.py", line 353, in execute_from_command_line utility.execute() File "/srv/mo...
pytz.exceptions.NonExistentTimeError
def store_dnsbl_result(self, domain, provider, results, **options): """Store DNSBL provider results for domain.""" alerts = {} to_create = [] for mx, result in list(results.items()): if not result: result = "" dnsbl_result = models.DNSBLResult.objects.filter( doma...
def store_dnsbl_result(self, domain, provider, results, **options): """Store DNSBL provider results for domain.""" alerts = {} to_create = [] for mx in results.keys(): result = "" if not results[mx] else results[mx] dnsbl_result = models.DNSBLResult.objects.filter( domain=dom...
https://github.com/modoboa/modoboa/issues/1243
Traceback (most recent call last): File "/srv/modoboa/instance/manage.py", line 22, in <module> execute_from_command_line(sys.argv) File "/srv/modoboa/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line utility.execute() File "/srv/modoboa/env/lib/python2.7/site-p...
django.db.utils.IntegrityError
def on_mailbox_modified(mailbox): """Update amavis records if address has changed.""" if ( parameters.get_admin("MANUAL_LEARNING") == "no" or not hasattr(mailbox, "old_full_address") or mailbox.full_address == mailbox.old_full_address ): return user = Users.objects.select...
def on_mailbox_modified(mailbox): """Update amavis records if address has changed.""" if ( parameters.get_admin("MANUAL_LEARNING") == "no" or not hasattr(mailbox, "old_full_address") or mailbox.full_address == mailbox.old_full_address ): return user = Users.objects.select...
https://github.com/modoboa/modoboa/issues/701
Traceback (most recent call last): File "/srv/python-envs/service/lib/python2.7/site-packages/django/core/handlers/base.py", line 112, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/srv/python-envs/service/lib/python2.7/site-packages/django/contrib/auth/decorators.py", ...
AttributeError
def get_mail_content(self, mailid): """Retrieve the content of a message.""" content = "".join( [str(qmail.mail_text) for qmail in Quarantine.objects.filter(mail=mailid)] ) if isinstance(content, unicode): content = content.encode("utf-8") return content
def get_mail_content(self, mailid): """Retrieve the content of a message.""" return Quarantine.objects.filter(mail=mailid)
https://github.com/modoboa/modoboa/issues/677
Traceback (most recent call last): File "/srv/modoboa/env/local/lib/python2.7/site-packages/Django-1.6.8-py2.7.egg/django/core/handlers/base.py", line 112, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/extension...
DataError
def get_mail_content(self, mailid): """Retrieve the content of a message.""" content = "".join( [str(qmail.mail_text) for qmail in Quarantine.objects.filter(mail=mailid)] ) if isinstance(content, unicode): content = content.encode("utf-8") return content
def get_mail_content(self, mailid): """Retrieve the content of a message.""" return Quarantine.objects.filter(mail=mailid).extra( select={"mail_text": "convert_from(mail_text, 'UTF8')"} )
https://github.com/modoboa/modoboa/issues/677
Traceback (most recent call last): File "/srv/modoboa/env/local/lib/python2.7/site-packages/Django-1.6.8-py2.7.egg/django/core/handlers/base.py", line 112, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/extension...
DataError
def msg(self): """Get message's content.""" import email if self._msg is None: mail_text = get_connector().get_mail_content(self.mailid) self._msg = email.message_from_string(mail_text) self._parse(self._msg) return self._msg
def msg(self): """Get message's content.""" import email if self._msg is None: qmails = get_connector().get_mail_content(self.mailid) mail_text = "".join([qm.mail_text for qm in qmails]) if type(mail_text) is unicode: mail_text = mail_text.encode("utf-8") self._m...
https://github.com/modoboa/modoboa/issues/677
Traceback (most recent call last): File "/srv/modoboa/env/local/lib/python2.7/site-packages/Django-1.6.8-py2.7.egg/django/core/handlers/base.py", line 112, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/extension...
DataError
def viewheaders(request, mail_id): """Display message headers.""" content = get_connector().get_mail_content(mail_id) msg = email.message_from_string(content) headers = [] for name, value in msg.items(): if value: result = chardet.detect(value) if result["encoding"] i...
def viewheaders(request, mail_id): """Display message headers.""" content = "" for qm in get_connector().get_mail_content(mail_id): content += qm.mail_text if type(content) is unicode: content = content.encode("utf-8") msg = email.message_from_string(content) headers = [] for...
https://github.com/modoboa/modoboa/issues/677
Traceback (most recent call last): File "/srv/modoboa/env/local/lib/python2.7/site-packages/Django-1.6.8-py2.7.egg/django/core/handlers/base.py", line 112, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/extension...
DataError
def mark_messages(request, selection, mtype, recipient_db=None): """Mark a selection of messages as spam. :param str selection: message unique identifier :param str mtype: type of marking (spam or ham) """ if not manual_learning_enabled(request.user): return render_to_json_response({"status...
def mark_messages(request, selection, mtype, recipient_db=None): """Mark a selection of messages as spam. :param str selection: message unique identifier :param str mtype: type of marking (spam or ham) """ if not manual_learning_enabled(request.user): return render_to_json_response({"status...
https://github.com/modoboa/modoboa/issues/677
Traceback (most recent call last): File "/srv/modoboa/env/local/lib/python2.7/site-packages/Django-1.6.8-py2.7.egg/django/core/handlers/base.py", line 112, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/extension...
DataError
def list_quotas(request): from modoboa.lib.dbutils import db_type sort_order, sort_dir = get_sort_order(request.GET, "address") mboxes = Mailbox.objects.get_for_admin( request.user, request.GET.get("searchquery", None) ) mboxes = mboxes.exclude(quota=0) if sort_order in ["address", "quo...
def list_quotas(request): from modoboa.lib.dbutils import db_type sort_order, sort_dir = get_sort_order(request.GET, "address") mboxes = Mailbox.objects.get_for_admin( request.user, request.GET.get("searchquery", None) ) mboxes = mboxes.exclude(quota=0) if sort_order in ["address", "quo...
https://github.com/modoboa/modoboa/issues/679
Traceback (most recent call last): File "/srv/modoboa/env/local/lib/python2.7/site-packages/Django-1.6.8-py2.7.egg/django/core/handlers/base.py", line 112, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/srv/modoboa/env/local/lib/python2.7/site-packages/Django-1.6.8-py2....
FieldError
def messages_count(self, **kwargs): if self.count is None: filter = Q(chunk_ind=1) if self.mail_ids is not None: filter &= Q(mail__in=self.mail_ids) if self.filter: filter &= self.filter self.messages = Quarantine.objects.filter(filter).values( "ma...
def messages_count(self, **kwargs): if self.count is None: filter = Q(chunk_ind=1) if self.mail_ids is not None: filter &= Q(mail__in=self.mail_ids) if self.filter: filter &= self.filter self.messages = Quarantine.objects.filter(filter).values( "ma...
https://github.com/modoboa/modoboa/issues/534
Internal Server Error: /quarantine/process/ Traceback (most recent call last): File "/srv/modoboa/python-virtualenv-modoboa-1.1.1/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/srv/modoboa/python-virtualen...
IntegrityError
def fetch(self, start=None, stop=None, **kwargs): emails = [] for qm in self.messages[start - 1 : stop]: m = { "from": qm["mail__from_addr"], "to": qm["mail__msgrcpt__rid__email"], "subject": qm["mail__subject"], "mailid": qm["mail__mail_id"], ...
def fetch(self, start=None, stop=None, **kwargs): emails = [] for qm in self.messages[start - 1 : stop]: m = { "from": qm["mail__from_addr"], "to": qm["mail__msgrcpt__rid__email"], "subject": qm["mail__subject"], "mailid": qm["mail__mail_id"], ...
https://github.com/modoboa/modoboa/issues/534
Internal Server Error: /quarantine/process/ Traceback (most recent call last): File "/srv/modoboa/python-virtualenv-modoboa-1.1.1/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/srv/modoboa/python-virtualen...
IntegrityError
def viewmail(request, mail_id): rcpt = request.GET["rcpt"] if request.user.mailbox_set.count(): mb = Mailbox.objects.get(user=request.user) if rcpt in mb.alias_addresses: get_wrapper().set_msgrcpt_status(rcpt, mail_id, "V") content = Template(""" <iframe src="{{ url }}" id="mail...
def viewmail(request, mail_id): rcpt = request.GET["rcpt"] if request.user.mailbox_set.count(): mb = Mailbox.objects.get(user=request.user) if rcpt in mb.alias_addresses: msgrcpt = get_wrapper().get_recipient_message(rcpt, mail_id) msgrcpt.rs = "V" msgrcpt.sav...
https://github.com/modoboa/modoboa/issues/534
Internal Server Error: /quarantine/process/ Traceback (most recent call last): File "/srv/modoboa/python-virtualenv-modoboa-1.1.1/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/srv/modoboa/python-virtualen...
IntegrityError
def delete_selfservice(request, mail_id): rcpt = request.GET.get("rcpt", None) if rcpt is None: raise BadRequest(_("Invalid request")) try: get_wrapper().set_msgrcpt_status(rcpt, mail_id, "D") except Msgrcpt.DoesNotExist: raise BadRequest(_("Invalid request")) return render_t...
def delete_selfservice(request, mail_id): rcpt = request.GET.get("rcpt", None) if rcpt is None: raise BadRequest(_("Invalid request")) try: msgrcpt = get_wrapper().get_recipient_message(rcpt, mail_id) msgrcpt.rs = "D" msgrcpt.save() except Msgrcpt.DoesNotExist: ra...
https://github.com/modoboa/modoboa/issues/534
Internal Server Error: /quarantine/process/ Traceback (most recent call last): File "/srv/modoboa/python-virtualenv-modoboa-1.1.1/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/srv/modoboa/python-virtualen...
IntegrityError
def delete(request, mail_id): """Delete message selection. :param str mail_id: message unique identifier """ mail_id = check_mail_id(request, mail_id) wrapper = get_wrapper() mb = ( Mailbox.objects.get(user=request.user) if request.user.group == "SimpleUsers" else None ...
def delete(request, mail_id): """Delete message selection. :param str mail_id: message unique identifier """ mail_id = check_mail_id(request, mail_id) wrapper = get_wrapper() mb = ( Mailbox.objects.get(user=request.user) if request.user.group == "SimpleUsers" else None ...
https://github.com/modoboa/modoboa/issues/534
Internal Server Error: /quarantine/process/ Traceback (most recent call last): File "/srv/modoboa/python-virtualenv-modoboa-1.1.1/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/srv/modoboa/python-virtualen...
IntegrityError
def release_selfservice(request, mail_id): rcpt = request.GET.get("rcpt", None) secret_id = request.GET.get("secret_id", None) if rcpt is None or secret_id is None: raise BadRequest(_("Invalid request")) wrapper = get_wrapper() try: msgrcpt = wrapper.get_recipient_message(rcpt, mail_...
def release_selfservice(request, mail_id): rcpt = request.GET.get("rcpt", None) secret_id = request.GET.get("secret_id", None) if rcpt is None or secret_id is None: raise BadRequest(_("Invalid request")) try: msgrcpt = get_wrapper().get_recipient_message(rcpt, mail_id) except Msgrcpt...
https://github.com/modoboa/modoboa/issues/534
Internal Server Error: /quarantine/process/ Traceback (most recent call last): File "/srv/modoboa/python-virtualenv-modoboa-1.1.1/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/srv/modoboa/python-virtualen...
IntegrityError
def release(request, mail_id): """Release message selection. :param str mail_id: message unique identifier """ mail_id = check_mail_id(request, mail_id) msgrcpts = [] wrapper = get_wrapper() mb = ( Mailbox.objects.get(user=request.user) if request.user.group == "SimpleUsers"...
def release(request, mail_id): """Release message selection. :param str mail_id: message unique identifier """ mail_id = check_mail_id(request, mail_id) msgrcpts = [] wrapper = get_wrapper() mb = ( Mailbox.objects.get(user=request.user) if request.user.group == "SimpleUsers"...
https://github.com/modoboa/modoboa/issues/534
Internal Server Error: /quarantine/process/ Traceback (most recent call last): File "/srv/modoboa/python-virtualenv-modoboa-1.1.1/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/srv/modoboa/python-virtualen...
IntegrityError
def get_password_hasher(scheme): """Retrieve the hasher corresponding to :keyword:`scheme`. If no class is found, `PLAINHasher` is returned. :param str scheme: a valid scheme name :rtype: PasswordHasher sub class :return: The hasher class """ try: scheme = scheme.replace("-", "") ...
def get_password_hasher(scheme): """Retrieve the hasher corresponding to :keyword:`scheme`. If no class is found, `PLAINHasher` is returned. :param str scheme: a valid scheme name :rtype: PasswordHasher sub class :return: The hasher class """ try: scheme = scheme.replace("-", "") ...
https://github.com/modoboa/modoboa/issues/514
Traceback (most recent call last): File "/srv/python-envs/service/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/srv/python-envs/service/lib/python2.7/site-packages/django/views/decorators/cache.py", line 89, ...
KeyError
def print_summary(samples, prob=0.9, group_by_chain=True): """ Prints a summary table displaying diagnostics of ``samples`` from the posterior. The diagnostics displayed are mean, standard deviation, median, the 90% Credibility Interval, :func:`~pyro.ops.stats.effective_sample_size`, :func:`~pyro.op...
def print_summary(samples, prob=0.9, group_by_chain=True): """ Prints a summary table displaying diagnostics of ``samples`` from the posterior. The diagnostics displayed are mean, standard deviation, median, the 90% Credibility Interval, :func:`~pyro.ops.stats.effective_sample_size`, :func:`~pyro.op...
https://github.com/pyro-ppl/pyro/issues/2607
Sample: 100%|██████████| 15/15 [00:00, 1853.70it/s, step size=1.00e+00, acc. prob=1.000] prior: tensor([0.2000, 0.2000, 0.2000, 0.2000, 0.2000]) Num elves: tensor(4) Rocks: 16, Logs: 24 Rocks obs: 4, Logs obs: 6 prior: tensor([0.2000, 0.2000, 0.2000, 0.2000, 0.2000]) Num elves: tensor([0, 1, 2, 3, 4]) Rocks: tensor([...
ValueError
def get_dependent_plate_dims(sites): """ Return a list of dims for plates that are not common to all sites. """ plate_sets = [ site["cond_indep_stack"] for site in sites if site["type"] == "sample" ] all_plates = set().union(*plate_sets) common_plates = all_plates.intersection(*plate...
def get_dependent_plate_dims(sites): """ Return a list of dims for plates that are not common to all sites. """ plate_sets = [ site["cond_indep_stack"] for site in sites if site["type"] == "sample" ] all_plates = set().union(*plate_sets) common_plates = all_plates.intersection(*plate...
https://github.com/pyro-ppl/pyro/issues/2361
3.8.1 (default, Jan 8 2020, 16:15:59) [Clang 4.0.1 (tags/RELEASE_401/final)] 1.4.0 1.3.0 2.4235687255859375 --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-5-6865281f40fd> in <module> 15 16 elbo = pyr...
TypeError
def run(self, *args, **kwargs): self._args, self._kwargs = args, kwargs num_samples = [0] * self.num_chains z_flat_acc = [[] for _ in range(self.num_chains)] with pyro.validation_enabled(not self.disable_validation): for x, chain_id in self.sampler.run(*args, **kwargs): if num_sample...
def run(self, *args, **kwargs): self._args, self._kwargs = args, kwargs num_samples = [0] * self.num_chains z_flat_acc = [[] for _ in range(self.num_chains)] with pyro.validation_enabled(not self.disable_validation): for x, chain_id in self.sampler.run(*args, **kwargs): if num_sample...
https://github.com/pyro-ppl/pyro/issues/2272
AttributeError Traceback (most recent call last) <ipython-input-13-5a1da811afef> in <module>() 8 mcmc = MCMC(nuts_kernel, num_samples=25, warmup_steps=100, num_chains=cpu_count) 9 ---> 10 mcmc.run(y) ~/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/pyro/poutine/messenger.py in _conte...
AttributeError
def get_posterior(self, *args, **kwargs): """ Returns a MultivariateNormal posterior distribution. """ loc = pyro.param("{}_loc".format(self.prefix), self._init_loc) scale_tril = pyro.param( "{}_scale_tril".format(self.prefix), lambda: eye_like(loc, self.latent_dim), constrai...
def get_posterior(self, *args, **kwargs): """ Returns a MultivariateNormal posterior distribution. """ loc = pyro.param("{}_loc".format(self.prefix), lambda: torch.zeros(self.latent_dim)) scale_tril = pyro.param( "{}_scale_tril".format(self.prefix), lambda: torch.eye(self.latent_dim)...
https://github.com/pyro-ppl/pyro/issues/1850
Traceback (most recent call last): File "C:\tools\miniconda3\envs\scanner-pyro\lib\site-packages\IPython\core\interactiveshell.py", line 3265, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-6-68d49e4377f9>", line 26, in <module> train() File "<ipython-input-6-68d49e4377f9>", line 23,...
RuntimeError
def get_posterior(self, *args, **kwargs): """ Returns a diagonal Normal posterior distribution. """ loc = pyro.param("{}_loc".format(self.prefix), self._init_loc) scale = pyro.param( "{}_scale".format(self.prefix), lambda: loc.new_ones(self.latent_dim), constraint=constraints...
def get_posterior(self, *args, **kwargs): """ Returns a diagonal Normal posterior distribution. """ loc = pyro.param("{}_loc".format(self.prefix), lambda: torch.zeros(self.latent_dim)) scale = pyro.param( "{}_scale".format(self.prefix), lambda: torch.ones(self.latent_dim), co...
https://github.com/pyro-ppl/pyro/issues/1850
Traceback (most recent call last): File "C:\tools\miniconda3\envs\scanner-pyro\lib\site-packages\IPython\core\interactiveshell.py", line 3265, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-6-68d49e4377f9>", line 26, in <module> train() File "<ipython-input-6-68d49e4377f9>", line 23,...
RuntimeError
def __init__(self, model, prefix="auto", init_loc_fn=init_to_median, rank=1): if not isinstance(rank, numbers.Number) or not rank > 0: raise ValueError("Expected rank > 0 but got {}".format(rank)) self.rank = rank super(AutoLowRankMultivariateNormal, self).__init__( model, prefix=prefix, ini...
def __init__(self, model, prefix="auto", rank=1): if not isinstance(rank, numbers.Number) or not rank > 0: raise ValueError("Expected rank > 0 but got {}".format(rank)) self.rank = rank super(AutoLowRankMultivariateNormal, self).__init__(model, prefix)
https://github.com/pyro-ppl/pyro/issues/1850
Traceback (most recent call last): File "C:\tools\miniconda3\envs\scanner-pyro\lib\site-packages\IPython\core\interactiveshell.py", line 3265, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-6-68d49e4377f9>", line 26, in <module> train() File "<ipython-input-6-68d49e4377f9>", line 23,...
RuntimeError
def get_posterior(self, *args, **kwargs): """ Returns a LowRankMultivariateNormal posterior distribution. """ loc = pyro.param("{}_loc".format(self.prefix), self._init_loc) factor = pyro.param( "{}_cov_factor".format(self.prefix), lambda: loc.new_empty(self.latent_dim, self.rank).nor...
def get_posterior(self, *args, **kwargs): """ Returns a LowRankMultivariateNormal posterior distribution. """ loc = pyro.param("{}_loc".format(self.prefix), lambda: torch.zeros(self.latent_dim)) factor = pyro.param( "{}_cov_factor".format(self.prefix), lambda: torch.randn(self.latent...
https://github.com/pyro-ppl/pyro/issues/1850
Traceback (most recent call last): File "C:\tools\miniconda3\envs\scanner-pyro\lib\site-packages\IPython\core\interactiveshell.py", line 3265, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-6-68d49e4377f9>", line 26, in <module> train() File "<ipython-input-6-68d49e4377f9>", line 23,...
RuntimeError
def __init__(self, model, hidden_dim=None, prefix="auto", init_loc_fn=init_to_median): self.hidden_dim = hidden_dim self.arn = None super(AutoIAFNormal, self).__init__(model, prefix=prefix, init_loc_fn=init_loc_fn)
def __init__(self, model, hidden_dim=None, prefix="auto"): self.hidden_dim = hidden_dim self.arn = None super(AutoIAFNormal, self).__init__(model, prefix)
https://github.com/pyro-ppl/pyro/issues/1850
Traceback (most recent call last): File "C:\tools\miniconda3\envs\scanner-pyro\lib\site-packages\IPython\core\interactiveshell.py", line 3265, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-6-68d49e4377f9>", line 26, in <module> train() File "<ipython-input-6-68d49e4377f9>", line 23,...
RuntimeError
def get_posterior(self, *args, **kwargs): """ Returns a Delta posterior distribution for MAP inference. """ loc = pyro.param("{}_loc".format(self.prefix), self._init_loc) return dist.Delta(loc).to_event(1)
def get_posterior(self, *args, **kwargs): """ Returns a Delta posterior distribution for MAP inference. """ loc = pyro.param("{}_loc".format(self.prefix), lambda: torch.zeros(self.latent_dim)) return dist.Delta(loc).to_event(1)
https://github.com/pyro-ppl/pyro/issues/1850
Traceback (most recent call last): File "C:\tools\miniconda3\envs\scanner-pyro\lib\site-packages\IPython\core\interactiveshell.py", line 3265, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-6-68d49e4377f9>", line 26, in <module> train() File "<ipython-input-6-68d49e4377f9>", line 23,...
RuntimeError
def main(args): baseball_dataset = pd.read_csv(DATA_URL, "\t") train, _, player_names = train_test_split(baseball_dataset) at_bats, hits = train[:, 0], train[:, 1] nuts_kernel = NUTS(conditioned_model) logging.info("Original Dataset:") logging.info(baseball_dataset) # (1) Full Pooling Model...
def main(args): baseball_dataset = pd.read_csv(DATA_URL, "\t") train, _, player_names = train_test_split(baseball_dataset) at_bats, hits = train[:, 0], train[:, 1] nuts_kernel = NUTS(conditioned_model) logging.info("Original Dataset:") logging.info(baseball_dataset) # (1) Full Pooling Model...
https://github.com/pyro-ppl/pyro/issues/1458
Traceback (most recent call last): File "/home/travis/build/uber/pyro/pyro/poutine/trace_struct.py", line 128, in log_prob_sum log_p = site["log_prob_sum"] KeyError: 'log_prob_sum' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/travis/build/uber/pyro/e...
KeyError
def main(args): pyro.set_rng_seed(args.rng_seed) baseball_dataset = pd.read_csv(DATA_URL, "\t") train, _, player_names = train_test_split(baseball_dataset) at_bats, hits = train[:, 0], train[:, 1] nuts_kernel = NUTS(conditioned_model) logging.info("Original Dataset:") logging.info(baseball_d...
def main(args): baseball_dataset = pd.read_csv(DATA_URL, "\t") train, _, player_names = train_test_split(baseball_dataset) at_bats, hits = train[:, 0], train[:, 1] nuts_kernel = NUTS(conditioned_model) logging.info("Original Dataset:") logging.info(baseball_dataset) # (1) Full Pooling Model...
https://github.com/pyro-ppl/pyro/issues/1458
Traceback (most recent call last): File "/home/travis/build/uber/pyro/pyro/poutine/trace_struct.py", line 128, in log_prob_sum log_p = site["log_prob_sum"] KeyError: 'log_prob_sum' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/travis/build/uber/pyro/e...
KeyError
def _kinetic_energy(self, r): # TODO: revert to `torch.dot` in pytorch==1.0 # See: https://github.com/uber/pyro/issues/1458 r_flat = torch.cat([r[site_name].reshape(-1) for site_name in sorted(r)]) if self.full_mass: return 0.5 * (r_flat * (self._inverse_mass_matrix.matmul(r_flat))).sum() el...
def _kinetic_energy(self, r): r_flat = torch.cat([r[site_name].reshape(-1) for site_name in sorted(r)]) if self.full_mass: return 0.5 * r_flat.dot(self._inverse_mass_matrix.matmul(r_flat)) else: return 0.5 * self._inverse_mass_matrix.dot(r_flat**2)
https://github.com/pyro-ppl/pyro/issues/1458
Traceback (most recent call last): File "/home/travis/build/uber/pyro/pyro/poutine/trace_struct.py", line 128, in log_prob_sum log_p = site["log_prob_sum"] KeyError: 'log_prob_sum' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/travis/build/uber/pyro/e...
KeyError
def model(self, xs, ys=None): """ The model corresponds to the following generative process: p(z) = normal(0,I) # handwriting style (latent) p(y|x) = categorical(I/10.) # which digit (semi-supervised) p(x|y,z) = bernoulli(mu(y,z)) # an image mu is given by a neural network `d...
def model(self, xs, ys=None): """ The model corresponds to the following generative process: p(z) = normal(0,I) # handwriting style (latent) p(y|x) = categorical(I/10.) # which digit (semi-supervised) p(x|y,z) = bernoulli(mu(y,z)) # an image mu is given by a neural network `d...
https://github.com/pyro-ppl/pyro/issues/725
$ python ss_vae_M2.py -enum Traceback (most recent call last): File "ss_vae_M2.py", line 464, in <module> run_inference_ss_vae(args) File "ss_vae_M2.py", line 371, in run_inference_ss_vae run_inference_for_epoch(data_loaders, losses, periodic_interval_batches) File "ss_vae_M2.py", line 268, in run_inference_for_epoch n...
NotImplementedError
def guide(self, xs, ys=None): """ The guide corresponds to the following: q(y|x) = categorical(alpha(x)) # infer digit from an image q(z|x,y) = normal(mu(x,y),sigma(x,y)) # infer handwriting style from an image and the digit mu, sigma are given by a neural network `encoder_z` ...
def guide(self, xs, ys=None): """ The guide corresponds to the following: q(y|x) = categorical(alpha(x)) # infer digit from an image q(z|x,y) = normal(mu(x,y),sigma(x,y)) # infer handwriting style from an image and the digit mu, sigma are given by a neural network `encoder_z` ...
https://github.com/pyro-ppl/pyro/issues/725
$ python ss_vae_M2.py -enum Traceback (most recent call last): File "ss_vae_M2.py", line 464, in <module> run_inference_ss_vae(args) File "ss_vae_M2.py", line 371, in run_inference_ss_vae run_inference_for_epoch(data_loaders, losses, periodic_interval_batches) File "ss_vae_M2.py", line 268, in run_inference_for_epoch n...
NotImplementedError
def model_sample(self, ys, batch_size=1): # sample the handwriting style from the constant prior distribution prior_mu = Variable(torch.zeros([batch_size, self.z_dim])) prior_sigma = Variable(torch.ones([batch_size, self.z_dim])) zs = pyro.sample("z", dist.normal, prior_mu, prior_sigma, extra_event_dims...
def model_sample(self, ys, batch_size=1): # sample the handwriting style from the constant prior distribution prior_mu = Variable(torch.zeros([batch_size, self.z_dim])) prior_sigma = Variable(torch.ones([batch_size, self.z_dim])) zs = pyro.sample("z", dist.normal, prior_mu, prior_sigma) # sample an...
https://github.com/pyro-ppl/pyro/issues/725
$ python ss_vae_M2.py -enum Traceback (most recent call last): File "ss_vae_M2.py", line 464, in <module> run_inference_ss_vae(args) File "ss_vae_M2.py", line 371, in run_inference_ss_vae run_inference_for_epoch(data_loaders, losses, periodic_interval_batches) File "ss_vae_M2.py", line 268, in run_inference_for_epoch n...
NotImplementedError
def torch_multinomial(input, num_samples, replacement=False): """ Like `torch.multinomial()` but works with cuda tensors. Does not support keyword argument `out`. """ if input.is_cuda: return torch.multinomial(input.cpu(), num_samples, replacement).cuda( input.get_device() ...
def torch_multinomial(input, num_samples, replacement=False): """ Like `torch.multinomial()` but works with cuda tensors. Does not support keyword argument `out`. """ if input.is_cuda: return torch_multinomial(input.cpu(), num_samples, replacement).cuda() else: return torch.multi...
https://github.com/pyro-ppl/pyro/issues/668
--------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-31-93fd337a0d5c> in <module>() ----> 1 train() <ipython-input-30-98110a9a9720> in train() 33 34 # Train and score ---> 35 train_...
RuntimeError
def iter_discrete_traces(graph_type, fn, *args, **kwargs): """ Iterate over all discrete choices of a stochastic function. When sampling continuous random variables, this behaves like `fn`. When sampling discrete random variables, this iterates over all choices. This yields `(scale, trace)` pairs,...
def iter_discrete_traces(graph_type, fn, *args, **kwargs): """ Iterate over all discrete choices of a stochastic function. When sampling continuous random variables, this behaves like `fn`. When sampling discrete random variables, this iterates over all choices. This yields `(scale, trace)` pairs,...
https://github.com/pyro-ppl/pyro/issues/668
--------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-31-93fd337a0d5c> in <module>() ----> 1 train() <ipython-input-30-98110a9a9720> in train() 33 34 # Train and score ---> 35 train_...
RuntimeError
def loss(self, model, guide, *args, **kwargs): """ :returns: returns an estimate of the ELBO :rtype: float Evaluates the ELBO with an estimator that uses num_particles many samples/particles. """ elbo = 0.0 for weight, model_trace, guide_trace, log_r in self._get_traces( model, guid...
def loss(self, model, guide, *args, **kwargs): """ :returns: returns an estimate of the ELBO :rtype: float Evaluates the ELBO with an estimator that uses num_particles many samples/particles. """ elbo = 0.0 for weight, model_trace, guide_trace, log_r in self._get_traces( model, guid...
https://github.com/pyro-ppl/pyro/issues/668
--------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-31-93fd337a0d5c> in <module>() ----> 1 train() <ipython-input-30-98110a9a9720> in train() 33 34 # Train and score ---> 35 train_...
RuntimeError
def loss_and_grads(self, model, guide, *args, **kwargs): """ :returns: returns an estimate of the ELBO :rtype: float Computes the ELBO as well as the surrogate ELBO that is used to form the gradient estimator. Performs backward on the latter. Num_particle many samples are used to form the estimator...
def loss_and_grads(self, model, guide, *args, **kwargs): """ :returns: returns an estimate of the ELBO :rtype: float Computes the ELBO as well as the surrogate ELBO that is used to form the gradient estimator. Performs backward on the latter. Num_particle many samples are used to form the estimator...
https://github.com/pyro-ppl/pyro/issues/668
--------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-31-93fd337a0d5c> in <module>() ----> 1 train() <ipython-input-30-98110a9a9720> in train() 33 34 # Train and score ---> 35 train_...
RuntimeError
def resolve_is_lower_case(tokenizer): if isinstance(tokenizer, transformers.BertTokenizer): return tokenizer.basic_tokenizer.do_lower_case if isinstance(tokenizer, transformers.AlbertTokenizer): return tokenizer.do_lower_case else: return False
def resolve_is_lower_case(tokenizer): if isinstance( tokenizer, (transformers.BertTokenizer, transformers.AlbertTokenizer) ): return tokenizer.basic_tokenizer.do_lower_case else: return False
https://github.com/nyu-mll/jiant/issues/1200
Traceback (most recent call last): File "/scratch/pmh330/nyu-mll-jiant/jiant/jiant/proj/main/tokenize_and_cache.py", line 214, in <module> main(args=RunConfiguration.run_cli_json_prepend()) File "/scratch/pmh330/nyu-mll-jiant/jiant/jiant/proj/main/tokenize_and_cache.py", line 168, in main args=args, File "/scratch/pmh3...
ValueError
def tokenize(self, tokenizer): passage = ( self.passage.lower() if model_resolution.resolve_is_lower_case(tokenizer=tokenizer) else self.passage ) passage_tokens = tokenizer.tokenize(passage) token_aligner = TokenAligner(source=passage, target=passage_tokens) answer_token_spa...
def tokenize(self, tokenizer): passage = ( self.passage.lower() if resolve_is_lower_case(tokenizer=tokenizer) else self.passage ) passage_tokens = tokenizer.tokenize(passage) token_aligner = TokenAligner(source=passage, target=passage_tokens) answer_token_span = token_aligner...
https://github.com/nyu-mll/jiant/issues/1200
Traceback (most recent call last): File "/scratch/pmh330/nyu-mll-jiant/jiant/jiant/proj/main/tokenize_and_cache.py", line 214, in <module> main(args=RunConfiguration.run_cli_json_prepend()) File "/scratch/pmh330/nyu-mll-jiant/jiant/jiant/proj/main/tokenize_and_cache.py", line 168, in main args=args, File "/scratch/pmh3...
ValueError
def get_task_specific_params(args, task_name): """Search args for parameters specific to task. Args: args: main-program args, a config.Params object task_name: (string) Returns: AllenNLP Params object of task-specific params. """ def _get_task_attr(attr_name, default=None): ...
def get_task_specific_params(args, task_name): """Search args for parameters specific to task. Args: args: main-program args, a config.Params object task_name: (string) Returns: AllenNLP Params object of task-specific params. """ def _get_task_attr(attr_name, default=None): ...
https://github.com/nyu-mll/jiant/issues/773
Traceback (most recent call last): File "main.py", line 566, in <module> main(sys.argv[1:]) File "main.py", line 534, in main phase="target_train", File "/Users/srbowman/jiant/src/trainer.py", line 594, in train output_dict = self._forward(batch, task=task) File "/Users/srbowman/jiant/src/trainer.py", line 1035, in _fo...
ValueError
def update_metrics(self, logits, labels, tagmask=None): logits, labels = logits.detach(), labels.detach() def make_one_hot(batch, depth=2): """ Creates a one-hot embedding of dimension 2. Parameters: batch: list of size batch_size of class predictions Returns: on...
def update_metrics(self, logits, labels, tagmask=None): logits, labels = logits.detach(), labels.detach() def make_one_hot(batch, depth=2): """ Creates a one-hot embedding of dimension 2. Parameters: batch: list of size batch_size of class predictions Returns: on...
https://github.com/nyu-mll/jiant/issues/773
Traceback (most recent call last): File "main.py", line 566, in <module> main(sys.argv[1:]) File "main.py", line 534, in main phase="target_train", File "/Users/srbowman/jiant/src/trainer.py", line 594, in train output_dict = self._forward(batch, task=task) File "/Users/srbowman/jiant/src/trainer.py", line 1035, in _fo...
ValueError
def make_one_hot(batch, depth=2): """ Creates a one-hot embedding of dimension 2. Parameters: batch: list of size batch_size of class predictions Returns: one hot encoding of size [batch_size, 2] """ ones = torch.sparse.torch.eye(depth) if torch.cuda.is_available(): ones = on...
def make_one_hot(batch, depth=2): """ Creates a one-hot embedding of dimension 2. Parameters: batch: list of size batch_size of class predictions Returns: one hot encoding of size [batch_size, 2] """ ones = torch.sparse.torch.eye(depth).cuda() return ones.index_select(0, batch)
https://github.com/nyu-mll/jiant/issues/773
Traceback (most recent call last): File "main.py", line 566, in <module> main(sys.argv[1:]) File "main.py", line 534, in main phase="target_train", File "/Users/srbowman/jiant/src/trainer.py", line 594, in train output_dict = self._forward(batch, task=task) File "/Users/srbowman/jiant/src/trainer.py", line 1035, in _fo...
ValueError
def parse(self, file): data = [] file = EncodedIO(file) file = io.TextIOWrapper(file, encoding=file.encoding) # Add check exception field_parsers = { "ne": lambda line, i: conllu.parser.parse_nullable_value(line[i]), } gen_parser = conllu.parse_incr( file, fields=("form", ...
def parse(self, file): data = [] file = io.TextIOWrapper(file, encoding="utf-8") # Add check exception field_parsers = { "ne": lambda line, i: conllu.parser.parse_nullable_value(line[i]), } gen_parser = conllu.parse_incr( file, fields=("form", "ne"), field_parsers=field_parser...
https://github.com/doccano/doccano/issues/88
Traceback (most recent call last): File "/app/server/views.py", line 121, in post documents = self.csv_to_documents(project, file) File "/app/server/views.py", line 77, in csv_to_documents maybe_header = next(reader) File "/virtualenvs/doccano-HEgudFLz/bin/../lib/python3.6/codecs.py", line 321, in decode (result, consu...
UnicodeDecodeError
def parse(self, file): file = EncodedIO(file) file = io.TextIOWrapper(file, encoding=file.encoding) while True: batch = list(itertools.islice(file, settings.IMPORT_BATCH_SIZE)) if not batch: break yield [{"text": line.strip()} for line in batch]
def parse(self, file): file = io.TextIOWrapper(file, encoding="utf-8") while True: batch = list(itertools.islice(file, settings.IMPORT_BATCH_SIZE)) if not batch: break yield [{"text": line.strip()} for line in batch]
https://github.com/doccano/doccano/issues/88
Traceback (most recent call last): File "/app/server/views.py", line 121, in post documents = self.csv_to_documents(project, file) File "/app/server/views.py", line 77, in csv_to_documents maybe_header = next(reader) File "/virtualenvs/doccano-HEgudFLz/bin/../lib/python3.6/codecs.py", line 321, in decode (result, consu...
UnicodeDecodeError
def parse(self, file): file = EncodedIO(file) file = io.TextIOWrapper(file, encoding=file.encoding) reader = csv.reader(file) yield from ExcelParser.parse_excel_csv_reader(reader)
def parse(self, file): file = io.TextIOWrapper(file, encoding="utf-8") reader = csv.reader(file) yield from ExcelParser.parse_excel_csv_reader(reader)
https://github.com/doccano/doccano/issues/88
Traceback (most recent call last): File "/app/server/views.py", line 121, in post documents = self.csv_to_documents(project, file) File "/app/server/views.py", line 77, in csv_to_documents maybe_header = next(reader) File "/virtualenvs/doccano-HEgudFLz/bin/../lib/python3.6/codecs.py", line 321, in decode (result, consu...
UnicodeDecodeError
def parse(self, file): file = EncodedIO(file) file = io.TextIOWrapper(file, encoding=file.encoding) data = [] for i, line in enumerate(file, start=1): if len(data) >= settings.IMPORT_BATCH_SIZE: yield data data = [] try: j = json.loads(line) ...
def parse(self, file): file = io.TextIOWrapper(file, encoding="utf-8") data = [] for i, line in enumerate(file, start=1): if len(data) >= settings.IMPORT_BATCH_SIZE: yield data data = [] try: j = json.loads(line) j["meta"] = json.dumps(j.get("m...
https://github.com/doccano/doccano/issues/88
Traceback (most recent call last): File "/app/server/views.py", line 121, in post documents = self.csv_to_documents(project, file) File "/app/server/views.py", line 77, in csv_to_documents maybe_header = next(reader) File "/virtualenvs/doccano-HEgudFLz/bin/../lib/python3.6/codecs.py", line 321, in decode (result, consu...
UnicodeDecodeError
def label_per_data(self, project): annotation_class = project.get_annotation_class() return annotation_class.objects.get_label_per_data(project=project)
def label_per_data(self, project): label_count = Counter() user_count = Counter() annotation_class = project.get_annotation_class() docs = project.documents.all() annotations = annotation_class.objects.filter(document_id__in=docs.all()) for d in annotations.values("label__text", "user__username"...
https://github.com/doccano/doccano/issues/268
Internal Server Error: /v1/projects/4/statistics Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response r...
django.core.exceptions.FieldError
def get(cls, language): try: if PYCOUNTRY: lang = ( languages.get(alpha_2=language) or languages.get(alpha_3=language) or languages.get(bibliographic=language) or languages.get(name=language) ) if not lang: ...
def get(cls, language): try: if PYCOUNTRY: # lookup workaround for alpha_2 language codes lang = ( languages.get(alpha_2=language) if re.match(r"^[a-z]{2}$", language) else languages.lookup(language) ) return Lan...
https://github.com/streamlink/streamlink/issues/3517
$ streamlink --loglevel debug https://www.raiplay.it/dirette/rai1 [cli][debug] OS: Linux-5.4.80-gentoo-r1-2-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E8400_@_3.00GHz-with-glibc2.2.5 [cli][debug] Python: 3.8.7 [cli][debug] Streamlink: 2.0.0+25.g7a74e18 [cli][debug] Requests(2.25.1), Socks(1.7.1), Websocket(0.57.0) [...
AttributeError
def close(self): if self.closed: return log.debug("Closing ffmpeg thread") if self.process: # kill ffmpeg self.process.kill() self.process.stdout.close() # close the streams for stream in self.streams: if hasattr(stream, "close") and callable(str...
def close(self): log.debug("Closing ffmpeg thread") if self.process: # kill ffmpeg self.process.kill() self.process.stdout.close() # close the streams for stream in self.streams: if hasattr(stream, "close"): stream.close() log.debug("...
https://github.com/streamlink/streamlink/issues/3357
$ streamlink "https://www.youtube.com/watch?v=VaU6GR8OHNU" -l trace [16:51:11.763092][cli][debug] OS: Linux-5.8.0-29-generic-x86_64-with-glibc2.32 [16:51:11.763170][cli][debug] Python: 3.8.6 [16:51:11.763193][cli][debug] Streamlink: 1.7.0+21.g70dc809 [16:51:11.763212][cli][debug] Requests(2.25.0), Socks(1.7...
ImportError
def authenticate(self): try: data = self._api_call("authenticate", {"auth": self.auth}, schema=_login_schema) except CrunchyrollAPIError: self.auth = None self.cache.set("auth", None, expires_at=0) log.warning("Saved credentials have expired") return log.debug("Crede...
def authenticate(self): data = self._api_call("authenticate", {"auth": self.auth}, schema=_login_schema) self.auth = data["auth"] self.cache.set("auth", data["auth"], expires_at=data["expires"]) return data
https://github.com/streamlink/streamlink/issues/3148
Traceback (most recent call last): File "runpy.py", line 193, in _run_module_as_main File "runpy.py", line 85, in _run_code File "C:\Users\kg\AppData\Local\Streamlink\bin\streamlink.exe\__main__.py", line 18, in <module> File "C:\Users\kg\AppData\Local\Streamlink\pkgs\streamlink_cli\main.py", line 1024, in main handle_...
streamlink.plugin.crunchyroll.CrunchyrollAPIError
def _get_streams(self): api = self._create_api() match = _url_re.match(self.url) media_id = int(match.group("media_id")) try: # the media.stream_data field is required, no stream data is returned otherwise info = api.get_info( media_id, fields=["media.stream_data"], schema=_...
def _get_streams(self): api = self._create_api() match = _url_re.match(self.url) media_id = int(match.group("media_id")) try: # the media.stream_data field is required, no stream data is returned otherwise info = api.get_info( media_id, fields=["media.stream_data"], schema=_...
https://github.com/streamlink/streamlink/issues/3148
Traceback (most recent call last): File "runpy.py", line 193, in _run_module_as_main File "runpy.py", line 85, in _run_code File "C:\Users\kg\AppData\Local\Streamlink\bin\streamlink.exe\__main__.py", line 18, in <module> File "C:\Users\kg\AppData\Local\Streamlink\pkgs\streamlink_cli\main.py", line 1024, in main handle_...
streamlink.plugin.crunchyroll.CrunchyrollAPIError
def _create_api(self): """Creates a new CrunchyrollAPI object, initiates it's session and tries to authenticate it either by using saved credentials or the user's username and password. """ if self.options.get("purge_credentials"): self.cache.set("session_id", None, 0) self.cache.set...
def _create_api(self): """Creates a new CrunchyrollAPI object, initiates it's session and tries to authenticate it either by using saved credentials or the user's username and password. """ if self.options.get("purge_credentials"): self.cache.set("session_id", None, 0) self.cache.set...
https://github.com/streamlink/streamlink/issues/3148
Traceback (most recent call last): File "runpy.py", line 193, in _run_module_as_main File "runpy.py", line 85, in _run_code File "C:\Users\kg\AppData\Local\Streamlink\bin\streamlink.exe\__main__.py", line 18, in <module> File "C:\Users\kg\AppData\Local\Streamlink\pkgs\streamlink_cli\main.py", line 1024, in main handle_...
streamlink.plugin.crunchyroll.CrunchyrollAPIError
def create_title(plugin=None): if args.title and plugin: title = LazyFormatter.format( maybe_decode(args.title, get_filesystem_encoding()), title=lambda: plugin.get_title() or DEFAULT_STREAM_METADATA["title"], author=lambda: plugin.get_author() or DEFAULT_STREAM_METADATA[...
def create_title(plugin=None): if args.title and plugin: title = LazyFormatter.format( maybe_encode(args.title), title=lambda: plugin.get_title() or DEFAULT_STREAM_METADATA["title"], author=lambda: plugin.get_author() or DEFAULT_STREAM_METADATA["author"], cate...
https://github.com/streamlink/streamlink/issues/2444
OS: macOS 10.14.2 Python: 2.7.14 Streamlink: 1.1.1 Requests(2.21.0), Socks(1.6.7), Websocket(0.47.0) Found matching plugin twitch for URL twitch.tv/quickybaby Plugin specific arguments: --twitch-oauth-token=******** (oauth_token) --twitch-disable-hosting=True (disable_hosting) --twitch-disable-ads=True (disable_ads) Ge...
UnicodeDecodeError
def _create_arguments(self): if self.namedpipe: filename = self.namedpipe.path elif self.filename: filename = self.filename elif self.http: filename = self.http.url else: filename = "-" extra_args = [] if self.title is not None: # vlc if self.play...
def _create_arguments(self): if self.namedpipe: filename = self.namedpipe.path elif self.filename: filename = self.filename elif self.http: filename = self.http.url else: filename = "-" extra_args = [] if self.title is not None: # vlc if self.play...
https://github.com/streamlink/streamlink/issues/2444
OS: macOS 10.14.2 Python: 2.7.14 Streamlink: 1.1.1 Requests(2.21.0), Socks(1.6.7), Websocket(0.47.0) Found matching plugin twitch for URL twitch.tv/quickybaby Plugin specific arguments: --twitch-oauth-token=******** (oauth_token) --twitch-disable-hosting=True (disable_hosting) --twitch-disable-ads=True (disable_ads) Ge...
UnicodeDecodeError
def _open_call(self): args = self._create_arguments() if is_win32: fargs = args else: fargs = subprocess.list2cmdline(args) log.debug("Calling: {0}".format(fargs)) subprocess.call( maybe_encode(args, get_filesystem_encoding()), stdout=self.stdout, stderr=self...
def _open_call(self): args = self._create_arguments() if is_win32: fargs = args else: fargs = subprocess.list2cmdline(args) log.debug("Calling: {0}".format(maybe_decode(fargs))) subprocess.call(args, stdout=self.stdout, stderr=self.stderr)
https://github.com/streamlink/streamlink/issues/2444
OS: macOS 10.14.2 Python: 2.7.14 Streamlink: 1.1.1 Requests(2.21.0), Socks(1.6.7), Websocket(0.47.0) Found matching plugin twitch for URL twitch.tv/quickybaby Plugin specific arguments: --twitch-oauth-token=******** (oauth_token) --twitch-disable-hosting=True (disable_hosting) --twitch-disable-ads=True (disable_ads) Ge...
UnicodeDecodeError
def _open_subprocess(self): # Force bufsize=0 on all Python versions to avoid writing the # unflushed buffer when closing a broken input pipe args = self._create_arguments() if is_win32: fargs = args else: fargs = subprocess.list2cmdline(args) log.debug("Opening subprocess: {0}"....
def _open_subprocess(self): # Force bufsize=0 on all Python versions to avoid writing the # unflushed buffer when closing a broken input pipe args = self._create_arguments() if is_win32: fargs = args else: fargs = subprocess.list2cmdline(args) log.debug("Opening subprocess: {0}"...
https://github.com/streamlink/streamlink/issues/2444
OS: macOS 10.14.2 Python: 2.7.14 Streamlink: 1.1.1 Requests(2.21.0), Socks(1.6.7), Websocket(0.47.0) Found matching plugin twitch for URL twitch.tv/quickybaby Plugin specific arguments: --twitch-oauth-token=******** (oauth_token) --twitch-disable-hosting=True (disable_hosting) --twitch-disable-ads=True (disable_ads) Ge...
UnicodeDecodeError
def maybe_encode(text, encoding="utf8"): if is_py2: if isinstance(text, unicode): return text.encode(encoding) else: return text else: return text
def maybe_encode(text, encoding="utf8"): if is_py2: return text.encode(encoding) else: return text
https://github.com/streamlink/streamlink/issues/2444
OS: macOS 10.14.2 Python: 2.7.14 Streamlink: 1.1.1 Requests(2.21.0), Socks(1.6.7), Websocket(0.47.0) Found matching plugin twitch for URL twitch.tv/quickybaby Plugin specific arguments: --twitch-oauth-token=******** (oauth_token) --twitch-disable-hosting=True (disable_hosting) --twitch-disable-ads=True (disable_ads) Ge...
UnicodeDecodeError
def _open_call(self): args = self._create_arguments() if is_win32: fargs = args else: fargs = subprocess.list2cmdline(args) log.debug("Calling: {0}".format(maybe_decode(fargs))) subprocess.call(args, stdout=self.stdout, stderr=self.stderr)
def _open_call(self): args = self._create_arguments() if is_win32: fargs = args else: fargs = subprocess.list2cmdline(args) log.debug("Calling: {0}".format(fargs)) subprocess.call(args, stdout=self.stdout, stderr=self.stderr)
https://github.com/streamlink/streamlink/issues/2444
OS: macOS 10.14.2 Python: 2.7.14 Streamlink: 1.1.1 Requests(2.21.0), Socks(1.6.7), Websocket(0.47.0) Found matching plugin twitch for URL twitch.tv/quickybaby Plugin specific arguments: --twitch-oauth-token=******** (oauth_token) --twitch-disable-hosting=True (disable_hosting) --twitch-disable-ads=True (disable_ads) Ge...
UnicodeDecodeError
def _open_subprocess(self): # Force bufsize=0 on all Python versions to avoid writing the # unflushed buffer when closing a broken input pipe args = self._create_arguments() if is_win32: fargs = args else: fargs = subprocess.list2cmdline(args) log.debug("Opening subprocess: {0}"...
def _open_subprocess(self): # Force bufsize=0 on all Python versions to avoid writing the # unflushed buffer when closing a broken input pipe args = self._create_arguments() if is_win32: fargs = args else: fargs = subprocess.list2cmdline(args) log.debug("Opening subprocess: {0}"....
https://github.com/streamlink/streamlink/issues/2444
OS: macOS 10.14.2 Python: 2.7.14 Streamlink: 1.1.1 Requests(2.21.0), Socks(1.6.7), Websocket(0.47.0) Found matching plugin twitch for URL twitch.tv/quickybaby Plugin specific arguments: --twitch-oauth-token=******** (oauth_token) --twitch-disable-hosting=True (disable_hosting) --twitch-disable-ads=True (disable_ads) Ge...
UnicodeDecodeError
def fetch(self, segment, retries=None): if self.closed or not retries: return try: request_args = copy.deepcopy(self.reader.stream.args) headers = request_args.pop("headers", {}) now = datetime.datetime.now(tz=utc) if segment.available_at > now: time_to_wait ...
def fetch(self, segment, retries=None): if self.closed or not retries: return try: headers = {} now = datetime.datetime.now(tz=utc) if segment.available_at > now: time_to_wait = (segment.available_at - now).total_seconds() fname = os.path.basename(urlpars...
https://github.com/streamlink/streamlink/issues/2291
$ streamlink https://www.tf1.fr/lci/direct 576p_dash [cli][debug] OS: Linux [cli][debug] Python: 3.6.7 [cli][debug] Streamlink: 1.0.0+3.g4100688.dirty [cli][debug] Requests(2.21.0), Socks(1.6.7), Websocket(0.54.0) [cli][info] Found matching plugin tf1 for URL https://www.tf1.fr/lci/direct [plugin.tf1][debug...
requests.exceptions.HTTPError