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 safe_update_index(path): chunk_id = path.rsplit("/", 1)[-1] if len(chunk_id) != STRLEN_CHUNKID: return for c in chunk_id: if c not in hexdigits: return try: self.update_index(path) self.successes += 1 self.logger.debug("Updated %s", path) excep...
def safe_update_index(path): chunk_id = path.rsplit("/", 1)[-1] if len(chunk_id) != STRLEN_CHUNKID: return for c in chunk_id: if c not in hexdigits: return try: self.update_index(path) self.successes += 1 self.logger.debug("Updated %s", path) excep...
https://github.com/open-io/oio-sds/issues/1512
11573 7F920C7A0730 log ERROR ERROR while updating /var/lib/oio/sds/OPENIO/rawx-0/7BD/7BDE49669C6616A0656097C6544923F1BB0EE711A23D9D18B7D23071997AB9F7 Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/oio/blob/indexer.py", line 65, in safe_update_index self.update_index(path) File "/usr/lib/pytho...
VolumeException
def run(self, *args, **kwargs): time.sleep(random() * self.interval) while True: pre = time.time() try: self.index_pass() except VolumeException as exc: self.logger.error("Cannot index chunks, will retry later: %s", exc) except Exception as exc: ...
def run(self, *args, **kwargs): time.sleep(random() * self.interval) while True: pre = time.time() try: self.index_pass() except Exception as e: self.logger.exception("ERROR during indexing: %s" % e) else: self.passes += 1 elapsed = (ti...
https://github.com/open-io/oio-sds/issues/1512
11573 7F920C7A0730 log ERROR ERROR while updating /var/lib/oio/sds/OPENIO/rawx-0/7BD/7BDE49669C6616A0656097C6544923F1BB0EE711A23D9D18B7D23071997AB9F7 Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/oio/blob/indexer.py", line 65, in safe_update_index self.update_index(path) File "/usr/lib/pytho...
VolumeException
def object_truncate(self, account, container, obj, version=None, size=None, **kwargs): """ Truncate object at specified size. Only shrink is supported. A download may occur if size is not on chunk boundaries. :param account: name of the account in which the object is stored :param container: name o...
def object_truncate(self, account, container, obj, version=None, size=None, **kwargs): """ Truncate object at specified size. Only shrink is supported. A download may occur if size is not on chunk boundaries. :param account: name of the account in which the object is stored :param container: name o...
https://github.com/open-io/oio-sds/issues/1369
Checking object "account=AUTH_demo, container=testing, obj=magic" Checking container "account=AUTH_demo, container=testing, obj=magic" Checking account "account=AUTH_demo, container=testing, obj=magic" Exception object "account=AUTH_demo, container=testing, obj=magic": ('reqid=None', 'Connection aborted.', HTTPExceptio...
KeyError
def object_locate( self, account, container, obj, version=None, properties=True, **kwargs ): """ Get a description of the object along with the list of its chunks. :param account: name of the account in which the object is stored :param container: name of the container in which the object is stored...
def object_locate(self, account, container, obj, version=None, **kwargs): """ Get a description of the object along with the list of its chunks. :param account: name of the account in which the object is stored :param container: name of the container in which the object is stored :param obj: name o...
https://github.com/open-io/oio-sds/issues/1369
Checking object "account=AUTH_demo, container=testing, obj=magic" Checking container "account=AUTH_demo, container=testing, obj=magic" Checking account "account=AUTH_demo, container=testing, obj=magic" Exception object "account=AUTH_demo, container=testing, obj=magic": ('reqid=None', 'Connection aborted.', HTTPExceptio...
KeyError
def object_fetch( self, account, container, obj, version=None, ranges=None, key_file=None, **kwargs ): """ Download an object. :param account: name of the account in which the object is stored :param container: name of the container in which the object is stored :param obj: name of the object t...
def object_fetch( self, account, container, obj, version=None, ranges=None, key_file=None, **kwargs ): meta, raw_chunks = self.object_locate( account, container, obj, version=version, **kwargs ) chunk_method = meta["chunk_method"] storage_method = STORAGE_METHODS.load(chunk_method) chunk...
https://github.com/open-io/oio-sds/issues/1369
Checking object "account=AUTH_demo, container=testing, obj=magic" Checking container "account=AUTH_demo, container=testing, obj=magic" Checking account "account=AUTH_demo, container=testing, obj=magic" Exception object "account=AUTH_demo, container=testing, obj=magic": ('reqid=None', 'Connection aborted.', HTTPExceptio...
KeyError
def chunk_audit(self, path): with open(path) as f: try: meta = read_chunk_metadata(f) except exc.MissingAttribute as e: raise exc.FaultyChunk("Missing extended attribute %s" % e) size = int(meta["chunk_size"]) md5_checksum = meta["chunk_hash"].lower() ...
def chunk_audit(self, path): with open(path) as f: try: meta = read_chunk_metadata(f) except exc.MissingAttribute as e: raise exc.FaultyChunk("Missing extended attribute %s" % e) size = int(meta["chunk_size"]) md5_checksum = meta["chunk_hash"].lower() ...
https://github.com/open-io/oio-sds/issues/1369
Checking object "account=AUTH_demo, container=testing, obj=magic" Checking container "account=AUTH_demo, container=testing, obj=magic" Checking account "account=AUTH_demo, container=testing, obj=magic" Exception object "account=AUTH_demo, container=testing, obj=magic": ('reqid=None', 'Connection aborted.', HTTPExceptio...
KeyError
def take_action(self, parsed_args): import os self.log.debug("take_action(%s)", parsed_args) account = self.app.client_manager.get_account() container = parsed_args.container objs = self.app.client_manager.storage.object_list(account, container) for obj in objs["objects"]: obj_name = ...
def take_action(self, parsed_args): import os self.log.debug("take_action(%s)", parsed_args) account = self.app.client_manager.get_account() container = parsed_args.container objs = self.app.client_manager.storage.object_list(account, container) for obj in objs["objects"]: obj_name = ...
https://github.com/open-io/oio-sds/issues/1369
Checking object "account=AUTH_demo, container=testing, obj=magic" Checking container "account=AUTH_demo, container=testing, obj=magic" Checking account "account=AUTH_demo, container=testing, obj=magic" Exception object "account=AUTH_demo, container=testing, obj=magic": ('reqid=None', 'Connection aborted.', HTTPExceptio...
KeyError
def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) super(SaveObject, self).take_action(parsed_args) container = parsed_args.container obj = parsed_args.object key_file = parsed_args.key_file if key_file and key_file[0] != "/": key_file = os.getcwd() + "/"...
def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) super(SaveObject, self).take_action(parsed_args) container = parsed_args.container obj = parsed_args.object key_file = parsed_args.key_file if key_file and key_file[0] != "/": key_file = os.getcwd() + "/"...
https://github.com/open-io/oio-sds/issues/1369
Checking object "account=AUTH_demo, container=testing, obj=magic" Checking container "account=AUTH_demo, container=testing, obj=magic" Checking account "account=AUTH_demo, container=testing, obj=magic" Exception object "account=AUTH_demo, container=testing, obj=magic": ('reqid=None', 'Connection aborted.', HTTPExceptio...
KeyError
def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) super(LocateObject, self).take_action(parsed_args) account = self.app.client_manager.get_account() container = parsed_args.container obj = parsed_args.object if parsed_args.auto: container = self.flatns_m...
def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) super(LocateObject, self).take_action(parsed_args) account = self.app.client_manager.get_account() container = parsed_args.container obj = parsed_args.object if parsed_args.auto: container = self.flatns_m...
https://github.com/open-io/oio-sds/issues/1369
Checking object "account=AUTH_demo, container=testing, obj=magic" Checking container "account=AUTH_demo, container=testing, obj=magic" Checking account "account=AUTH_demo, container=testing, obj=magic" Exception object "account=AUTH_demo, container=testing, obj=magic": ('reqid=None', 'Connection aborted.', HTTPExceptio...
KeyError
def compute(self, conn, data=None): tarinfo = TarInfo() tarinfo.name = self.name tarinfo.mod = 0o700 tarinfo.uid = 0 tarinfo.gid = 0 tarinfo.type = REGTYPE tarinfo.linkname = "" if self.name == CONTAINER_PROPERTIES: meta = data or conn.container_get_properties(self.acct, self.re...
def compute(self, conn, data=None): tarinfo = TarInfo() tarinfo.name = self.name tarinfo.mod = 0o700 tarinfo.uid = 0 tarinfo.gid = 0 tarinfo.type = REGTYPE tarinfo.linkname = "" if self.name == CONTAINER_PROPERTIES: meta = data or conn.container_get_properties(self.acct, self.re...
https://github.com/open-io/oio-sds/issues/1369
Checking object "account=AUTH_demo, container=testing, obj=magic" Checking container "account=AUTH_demo, container=testing, obj=magic" Checking account "account=AUTH_demo, container=testing, obj=magic" Exception object "account=AUTH_demo, container=testing, obj=magic": ('reqid=None', 'Connection aborted.', HTTPExceptio...
KeyError
def create_tar_oio_stream(self, entry, range_): """Extract data from entry from object""" mem = "" name = entry["name"] if range_[0] < entry["hdr_blocks"]: tar = OioTarEntry(self.storage, self.acct, self.container, name) for bl in xrange(entry["hdr_blocks"]): if bl >= range...
def create_tar_oio_stream(self, entry, range_): """Extract data from entry from object""" mem = "" name = entry["name"] if range_[0] < entry["hdr_blocks"]: tar = OioTarEntry(self.storage, self.acct, self.container, name) for bl in xrange(entry["hdr_blocks"]): if bl >= range...
https://github.com/open-io/oio-sds/issues/1369
Checking object "account=AUTH_demo, container=testing, obj=magic" Checking container "account=AUTH_demo, container=testing, obj=magic" Checking account "account=AUTH_demo, container=testing, obj=magic" Exception object "account=AUTH_demo, container=testing, obj=magic": ('reqid=None', 'Connection aborted.', HTTPExceptio...
KeyError
def content_locate( self, account=None, reference=None, path=None, cid=None, content=None, version=None, properties=True, **kwargs, ): """ Get a description of the content along with the list of its chunks. :param cid: container id that can be used in place of `account` ...
def content_locate( self, account=None, reference=None, path=None, cid=None, content=None, version=None, **kwargs, ): """ Get a description of the content along with the list of its chunks. :param cid: container id that can be used in place of `account` and `referenc...
https://github.com/open-io/oio-sds/issues/1369
Checking object "account=AUTH_demo, container=testing, obj=magic" Checking container "account=AUTH_demo, container=testing, obj=magic" Checking account "account=AUTH_demo, container=testing, obj=magic" Exception object "account=AUTH_demo, container=testing, obj=magic": ('reqid=None', 'Connection aborted.', HTTPExceptio...
KeyError
def check_obj(self, target, recurse=False): account = target.account container = target.container obj = target.obj if (account, container, obj) in self.running: self.running[(account, container, obj)].wait() if (account, container, obj) in self.list_cache: return self.list_cache[(ac...
def check_obj(self, target, recurse=False): account = target.account container = target.container obj = target.obj if (account, container, obj) in self.running: self.running[(account, container, obj)].wait() if (account, container, obj) in self.list_cache: return self.list_cache[(ac...
https://github.com/open-io/oio-sds/issues/1369
Checking object "account=AUTH_demo, container=testing, obj=magic" Checking container "account=AUTH_demo, container=testing, obj=magic" Checking account "account=AUTH_demo, container=testing, obj=magic" Exception object "account=AUTH_demo, container=testing, obj=magic": ('reqid=None', 'Connection aborted.', HTTPExceptio...
KeyError
def init(self): eventlet.monkey_patch(os=False) self.tube = self.conf.get("tube", DEFAULT_TUBE) self.session = requests.Session() self.cs = ConscienceClient(self.conf) self.rdir = RdirClient(self.conf) self._acct_addr = None self.acct_update = 0 self.graceful_timeout = 1 self.acct_re...
def init(self): eventlet.monkey_patch(os=False) self.tube = self.conf.get("tube", DEFAULT_TUBE) self.session = requests.Session() self.cs = ConscienceClient(self.conf) self.rdir = RdirClient(self.conf) self._acct_addr = None self.acct_update = 0 self.graceful_timeout = 1 self.acct_re...
https://github.com/open-io/oio-sds/issues/882
Traceback (most recent call last): File "/home/fvennetier/src/public_git/oio-sds/oio/event/agent.py", line 166, in spawn_worker worker.init() File "/home/fvennetier/src/public_git/oio-sds/oio/event/consumer.py", line 144, in init app=self) File "/home/fvennetier/src/public_git/oio-sds/oio/event/loader.py", line 72, in ...
LookupError
def loadhandlers(path, global_conf=None, **kwargs): loader = ConfigLoader(path) handlers = {} handlers.update( (name[8:], loadhandler(loader, name[8:], global_conf, **kwargs)) for name in loader.get_sections(prefix="handler") ) return handlers
def loadhandlers(path, names, global_conf=None, **kwargs): loader = ConfigLoader(path) handlers = {} handlers.update( (name, loadhandler(loader, name, global_conf, **kwargs)) for name in names ) return handlers
https://github.com/open-io/oio-sds/issues/882
Traceback (most recent call last): File "/home/fvennetier/src/public_git/oio-sds/oio/event/agent.py", line 166, in spawn_worker worker.init() File "/home/fvennetier/src/public_git/oio-sds/oio/event/consumer.py", line 144, in init app=self) File "/home/fvennetier/src/public_git/oio-sds/oio/event/loader.py", line 72, in ...
LookupError
def __init__(self, namespace, session=None, **kwargs): self.conf = {"namespace": namespace} self.conf.update(kwargs) self._volume = None self._event = None self._cluster = None self._meta0 = None self.session = session
def __init__(self, namespace, endpoint=None, session=None): self.conf = {"namespace": namespace} self._volume = None self._event = None self._cluster = None self._meta0 = None self.session = session
https://github.com/open-io/oio-sds/issues/828
# openio --oio-ns=VCFR1 directory bootstrap --replicas 3 -v --debug Starting new HTTP connection (1): 172.17.25.5 "GET /v3.0/VCFR1/conscience/list?type=meta1 HTTP/1.1" 200 376 Computing meta1 prefix mapping... 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Equilibrating... META1 Digits = 4 Replicas = 3 Scored positively =...
ConnectionError
def make_client(instance): """ Build an AdminClient that will be added as "admin" field of `instance`. :param instance: an instance of ClientManager :returns: an instance of AdminClient """ client = AdminClient(**instance.get_process_configuration()) return client
def make_client(instance): """ Build an AdminClient that will be added as "admin" field of `instance`. :param instance: an instance of ClientManager :returns: an instance of AdminClient """ endpoint = instance.get_endpoint("admin") client = AdminClient( session=instance.session,...
https://github.com/open-io/oio-sds/issues/828
# openio --oio-ns=VCFR1 directory bootstrap --replicas 3 -v --debug Starting new HTTP connection (1): 172.17.25.5 "GET /v3.0/VCFR1/conscience/list?type=meta1 HTTP/1.1" 200 376 Computing meta1 prefix mapping... 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Equilibrating... META1 Digits = 4 Replicas = 3 Scored positively =...
ConnectionError
def __get__(self, instance, owner): instance.setup() if self._handle is None: self._handle = self.factory(instance) return self._handle
def __get__(self, instance, owner): if self._handle is None: self._handle = self.factory(instance) return self._handle
https://github.com/open-io/oio-sds/issues/828
# openio --oio-ns=VCFR1 directory bootstrap --replicas 3 -v --debug Starting new HTTP connection (1): 172.17.25.5 "GET /v3.0/VCFR1/conscience/list?type=meta1 HTTP/1.1" 200 376 Computing meta1 prefix mapping... 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Equilibrating... META1 Digits = 4 Replicas = 3 Scored positively =...
ConnectionError
def setup(self): if not self.setup_done: if not self._options.get("namespace", None): msg = "Set a namespace with --oio-ns, OIO_NS\n" raise exceptions.CommandError("Missing parameter: \n%s" % msg) self.namespace = self._options["namespace"] sds_conf = load_namespace_c...
def setup(self): if not self.setup_done: if not self._options.get("namespace", None): msg = "Set a namespace with --oio-ns, OIO_NS\n" raise exceptions.CommandError("Missing parameter: \n%s" % msg) self.namespace = self._options["namespace"] sds_conf = load_namespace_c...
https://github.com/open-io/oio-sds/issues/828
# openio --oio-ns=VCFR1 directory bootstrap --replicas 3 -v --debug Starting new HTTP connection (1): 172.17.25.5 "GET /v3.0/VCFR1/conscience/list?type=meta1 HTTP/1.1" 200 376 Computing meta1 prefix mapping... 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Equilibrating... META1 Digits = 4 Replicas = 3 Scored positively =...
ConnectionError
def build_option_parser(self, description, version): parser = super(OpenIOShell, self).build_option_parser(description, version) parser.add_argument( "--oio-ns", metavar="<namespace>", dest="ns", default=utils.env("OIO_NS"), help="Namespace name (Env: OIO_NS)", ) ...
def build_option_parser(self, description, version): parser = super(OpenIOShell, self).build_option_parser(description, version) parser.add_argument( "--oio-ns", metavar="<namespace>", dest="ns", default=utils.env("OIO_NS"), help="Namespace name (Env: OIO_NS)", ) ...
https://github.com/open-io/oio-sds/issues/828
# openio --oio-ns=VCFR1 directory bootstrap --replicas 3 -v --debug Starting new HTTP connection (1): 172.17.25.5 "GET /v3.0/VCFR1/conscience/list?type=meta1 HTTP/1.1" 200 376 Computing meta1 prefix mapping... 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Equilibrating... META1 Digits = 4 Replicas = 3 Scored positively =...
ConnectionError
def initialize_app(self, argv): super(OpenIOShell, self).initialize_app(argv) for module in clientmanager.PLUGIN_MODULES: api = module.API_NAME cmd_group = "openio." + api.replace("-", "_") self.command_manager.add_command_group(cmd_group) self.log.debug("%s API: cmd group %s" %...
def initialize_app(self, argv): super(OpenIOShell, self).initialize_app(argv) for module in clientmanager.PLUGIN_MODULES: api = module.API_NAME cmd_group = "openio." + api.replace("-", "_") self.command_manager.add_command_group(cmd_group) self.log.debug("%s API: cmd group %s" %...
https://github.com/open-io/oio-sds/issues/828
# openio --oio-ns=VCFR1 directory bootstrap --replicas 3 -v --debug Starting new HTTP connection (1): 172.17.25.5 "GET /v3.0/VCFR1/conscience/list?type=meta1 HTTP/1.1" 200 376 Computing meta1 prefix mapping... 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Equilibrating... META1 Digits = 4 Replicas = 3 Scored positively =...
ConnectionError
def get_logger( conf, name=None, verbose=False, fmt="%(process)d %(thread)X %(name)s %(levelname)s %(message)s", ): if not conf: conf = {} if name is None: name = "log" logger = logging.getLogger(name) logger.propagate = False syslog_prefix = conf.get("syslog_prefix"...
def get_logger( conf, name=None, verbose=False, fmt="%(process)d %(thread)X %(name)s %(levelname)s %(message)s", ): if not conf: conf = {} if name is None: name = "log" logger = logging.getLogger(name) logger.propagate = False syslog_prefix = conf.get("syslog_prefix"...
https://github.com/open-io/oio-sds/issues/828
# openio --oio-ns=VCFR1 directory bootstrap --replicas 3 -v --debug Starting new HTTP connection (1): 172.17.25.5 "GET /v3.0/VCFR1/conscience/list?type=meta1 HTTP/1.1" 200 376 Computing meta1 prefix mapping... 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Equilibrating... META1 Digits = 4 Replicas = 3 Scored positively =...
ConnectionError
def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) account = self.app.client_manager.get_account() container = parsed_args.container data = self.app.client_manager.storage.container_get_properties(account, container) data_dir = self.app.client_manager.directory.get...
def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) account = self.app.client_manager.get_account() container = parsed_args.container data = self.app.client_manager.storage.container_show(account, container) data_dir = self.app.client_manager.directory.get(account, ...
https://github.com/open-io/oio-sds/issues/800
### 0 /home/jfs/public_git/github.com/jfsmig/oio-sds (oio)jfs@jfs-lenovo 14 # openio container create JFS +------+---------+ | Name | Created | +------+---------+ | JFS  | True    | +------+---------+ ### 0 /home/jfs/public_git/github.com/jfsmig/oio-sds (oio)jfs@jfs-lenovo 15 # openio --debug -v container locate JFS ...
KeyError
def delete_chunk(self, chunk): resp = None parsed = urlparse(chunk["id"]) try: with Timeout(CHUNK_TIMEOUT): conn = http_connect(parsed.netloc, "DELETE", parsed.path) resp = conn.getresponse() resp.chunk = chunk except (Exception, Timeout) as exc: self....
def delete_chunk(chunk): resp = None p = urlparse(chunk["id"]) try: with Timeout(CHUNK_TIMEOUT): conn = http_connect(p.netloc, "DELETE", p.path) resp = conn.getresponse() resp.chunk = chunk except (Exception, Timeout) as e: self.logger.warn( ...
https://github.com/open-io/oio-sds/issues/695
Sep 06 11:30:47.385138 linux-cgzg OIO,NS,event-agent[11419]: 11419 7F6667BF5690 log ERROR handling event 4452 (bury) Traceback (most recent call last): File "/home/fvennetier/src/public_git/oio-sds/oio/event/consumer.py", line 209, in handle self.process_event(job_id, event, beanstalk) File "/home/fvennetier/src/public...
TypeError
def process(self, env, cb): event = Event(env) if event.event_type == EventTypes.CONTENT_DELETED: url = event.env.get("url") chunks = [] content_headers = None for item in event.data: if item.get("type") == "chunks": chunks.append(item) if ...
def process(self, env, cb): event = Event(env) if event.event_type == EventTypes.CONTENT_DELETED: pile = GreenPile(PARALLEL_CHUNKS_DELETE) url = event.env.get("url") chunks = [] content_headers = None for item in event.data: if item.get("type") == "chunks": ...
https://github.com/open-io/oio-sds/issues/695
Sep 06 11:30:47.385138 linux-cgzg OIO,NS,event-agent[11419]: 11419 7F6667BF5690 log ERROR handling event 4452 (bury) Traceback (most recent call last): File "/home/fvennetier/src/public_git/oio-sds/oio/event/consumer.py", line 209, in handle self.process_event(job_id, event, beanstalk) File "/home/fvennetier/src/public...
TypeError
def register(self): # Use a boolean so we can easily convert it to a number in conscience self.service_definition["tags"]["tag.up"] = self.last_status try: self.cs.register(self.service["type"], self.service_definition) except requests.RequestException as rqe: self.logger.warn( ...
def register(self): # Use a boolean so we can easily convert it to a number in conscience self.service_definition["tags"]["tag.up"] = self.last_status self.cs.register(self.service["type"], self.service_definition)
https://github.com/open-io/oio-sds/issues/537
avril 06 18:06:15 jfs-lenovo OIO,NS,conscience-agent,1[30650]: 30650 7F345DA59690 log INFO watcher "meta0|127.0.0.1|6005" stopped avril 06 18:06:15 jfs-lenovo OIO,NS,conscience-agent,1[30650]: 30650 7F345EAEAEB0 log ERROR STDERR : Traceback (most recent call last): avril 06 18:06:15 jfs-lenovo OIO,NS,conscience-agent,1...
ConnectionError
def install_db( root_login="root", root_password=None, db_name=None, source_sql=None, admin_password=None, verbose=True, force=0, site_config=None, reinstall=False, db_type=None, db_host=None, db_port=None, db_password=None, no_mariadb_socket=False, ): from fr...
def install_db( root_login="root", root_password=None, db_name=None, source_sql=None, admin_password=None, verbose=True, force=0, site_config=None, reinstall=False, db_type=None, db_host=None, db_port=None, db_password=None, no_mariadb_socket=False, ): from fr...
https://github.com/frappe/frappe/issues/12125
$ bench new-site mypgsql.localhost --db-type postgres --db-host postgresql WARN: bench is installed in editable mode! This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench` Traceback (most recent call last): File "/usr/lib/python3.7/run...
psycopg2.OperationalError
def make_conf( db_name=None, db_password=None, site_config=None, db_type=None, db_host=None, db_port=None, ): site = frappe.local.site make_site_config( db_name, db_password, site_config, db_type=db_type, db_host=db_host, db_port=db_port, ...
def make_conf(db_name=None, db_password=None, site_config=None, db_type=None): site = frappe.local.site make_site_config(db_name, db_password, site_config, db_type=db_type) sites_path = frappe.local.sites_path frappe.destroy() frappe.init(site, sites_path=sites_path)
https://github.com/frappe/frappe/issues/12125
$ bench new-site mypgsql.localhost --db-type postgres --db-host postgresql WARN: bench is installed in editable mode! This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench` Traceback (most recent call last): File "/usr/lib/python3.7/run...
psycopg2.OperationalError
def make_site_config( db_name=None, db_password=None, site_config=None, db_type=None, db_host=None, db_port=None, ): frappe.create_folder(os.path.join(frappe.local.site_path)) site_file = get_site_config_path() if not os.path.exists(site_file): if not (site_config and isinst...
def make_site_config(db_name=None, db_password=None, site_config=None, db_type=None): frappe.create_folder(os.path.join(frappe.local.site_path)) site_file = get_site_config_path() if not os.path.exists(site_file): if not (site_config and isinstance(site_config, dict)): site_config = get...
https://github.com/frappe/frappe/issues/12125
$ bench new-site mypgsql.localhost --db-type postgres --db-host postgresql WARN: bench is installed in editable mode! This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench` Traceback (most recent call last): File "/usr/lib/python3.7/run...
psycopg2.OperationalError
def check_release_on_github(app: str): """ Check the latest release for a given Frappe application hosted on Github. Args: app (str): The name of the Frappe application. Returns: tuple(Version, str): The semantic version object of the latest release and the ...
def check_release_on_github(app): # Check if repo remote is on github from subprocess import CalledProcessError try: remote_url = subprocess.check_output( "cd ../apps/{} && git ls-remote --get-url".format(app), shell=True ).decode() except CalledProcessError: # Passi...
https://github.com/frappe/frappe/issues/11097
{'method_name': 'frappe.utils.change_log.check_for_update', 'log': <function log at 0x7f837e01f730>, 'retry': 0, 'is_async': True, 'user': 'Administrator', 'kwargs': {}, 'job_name': 'frappe.utils.change_log.check_for_update', 'event': 'daily_long', 'method': <function check_for_update at 0x7f837e54cae8>, 'site': 'my.er...
ValueError
def on_update(self): """update all email accounts using this domain""" for email_account in frappe.get_all("Email Account", filters={"domain": self.name}): try: email_account = frappe.get_doc("Email Account", email_account.name) for attr in [ "email_server", ...
def on_update(self): """update all email accounts using this domain""" for email_account in frappe.get_all("Email Account", filters={"domain": self.name}): try: email_account = frappe.get_doc("Email Account", email_account.name) for attr in [ "email_server", ...
https://github.com/frappe/frappe/issues/11556
Traceback (most recent call last): File "/home/erpnext/frappe-bench/apps/frappe/frappe/app.py", line 64, in application response = frappe.api.handle() File "/home/erpnext/frappe-bench/apps/frappe/frappe/api.py", line 59, in handle return frappe.handler.handle() File "/home/erpnext/frappe-bench/apps/frappe/frappe/handle...
ssl.SSLError
def on_update(self): """update all email accounts using this domain""" for email_account in frappe.get_all("Email Account", filters={"domain": self.name}): try: email_account = frappe.get_doc("Email Account", email_account.name) email_account.set("email_server", self.email_server...
def on_update(self): """update all email accounts using this domain""" for email_account in frappe.get_all("Email Account", filters={"domain": self.name}): try: email_account = frappe.get_doc("Email Account", email_account.name) email_account.set("email_server", self.email_server...
https://github.com/frappe/frappe/issues/11556
Traceback (most recent call last): File "/home/erpnext/frappe-bench/apps/frappe/frappe/app.py", line 64, in application response = frappe.api.handle() File "/home/erpnext/frappe-bench/apps/frappe/frappe/api.py", line 59, in handle return frappe.handler.handle() File "/home/erpnext/frappe-bench/apps/frappe/frappe/handle...
ssl.SSLError
def application(request): response = None try: rollback = True init_request(request) frappe.recorder.record() frappe.monitor.start() frappe.rate_limiter.apply() if frappe.local.form_dict.cmd: response = frappe.handler.handle() elif frappe....
def application(request): response = None try: rollback = True init_request(request) frappe.recorder.record() frappe.monitor.start() frappe.rate_limiter.apply() if frappe.local.form_dict.cmd: response = frappe.handler.handle() elif frappe....
https://github.com/frappe/frappe/issues/11181
127.0.0.1 - - [03/Aug/2020 10:17:14] "GET / HTTP/1.0" 500 - 10:17:14 web.1 | INFO:werkzeug:127.0.0.1 - - [03/Aug/2020 10:17:14] "GET / HTTP/1.0" 500 - 10:17:14 web.1 | Traceback (most recent call last): 10:17:14 web.1 | File "/home/frappe/frappe-bench/apps/frappe/frappe/middlewares.py...
FileNotFoundError
def get_logger( module=None, with_more_info=False, allow_site=True, filter=None, max_size=100_000, file_count=20, ): """Application Logger for your given module Args: module (str, optional): Name of your logger and consequently your log file. Defaults to None. wi...
def get_logger( module=None, with_more_info=False, allow_site=True, filter=None, max_size=100_000, file_count=20, ): """Application Logger for your given module Args: module (str, optional): Name of your logger and consequently your log file. Defaults to None. wi...
https://github.com/frappe/frappe/issues/11181
127.0.0.1 - - [03/Aug/2020 10:17:14] "GET / HTTP/1.0" 500 - 10:17:14 web.1 | INFO:werkzeug:127.0.0.1 - - [03/Aug/2020 10:17:14] "GET / HTTP/1.0" 500 - 10:17:14 web.1 | Traceback (most recent call last): 10:17:14 web.1 | File "/home/frappe/frappe-bench/apps/frappe/frappe/middlewares.py...
FileNotFoundError
def update_user_setting_filters(data, key, user_setting): timespan_map = { "1 week": "week", "1 month": "month", "3 months": "quarter", "6 months": "6 months", "1 year": "year", } period_map = {"Previous": "last", "Next": "next"} if data.get(key): update...
def update_user_setting_filters(data, key, user_setting): timespan_map = { "1 week": "week", "1 month": "month", "3 months": "quarter", "6 months": "6 months", "1 year": "year", } period_map = {"Previous": "last", "Next": "next"} if data.get(key): update...
https://github.com/frappe/frappe/issues/10560
Patching sites... Migrating bench-manager.local Updating DocTypes for frappe : [========================================] 100% Updating DocTypes for bench_manager : [========================================] 100% Updating Dashboard for frappe Updating Dashboard for bench_manager fatal: Needed a single revision G...
TypeError
def send_email(success, service_name, doctype, email_field, error_status=None): recipients = get_recipients(doctype, email_field) if not recipients: frappe.log_error( "No Email Recipient found for {0}".format(service_name), "{0}: Failed to send backup status email".format(service...
def send_email(success, service_name, doctype, email_field, error_status=None): recipients = get_recipients(service_name, email_field) if not recipients: frappe.log_error( "No Email Recipient found for {0}".format(service_name), "{0}: Failed to send backup status email".format(se...
https://github.com/frappe/frappe/issues/10080
[2020-04-23 16:08:24 +0000] [3664] [ERROR] Error handling request / Traceback (most recent call last): File "/home/ubuntu/frappe-bench/apps/frappe/frappe/app.py", line 53, in application init_request(request) File "/home/ubuntu/frappe-bench/apps/frappe/frappe/app.py", line 108, in init_request frappe.init(site=site, si...
KeyError
def get_recipients(doctype, email_field): if not frappe.db: frappe.connect() return split_emails(frappe.db.get_value(doctype, None, email_field))
def get_recipients(service_name, email_field): if not frappe.db: frappe.connect() return split_emails(frappe.db.get_value(service_name, None, email_field))
https://github.com/frappe/frappe/issues/10080
[2020-04-23 16:08:24 +0000] [3664] [ERROR] Error handling request / Traceback (most recent call last): File "/home/ubuntu/frappe-bench/apps/frappe/frappe/app.py", line 53, in application init_request(request) File "/home/ubuntu/frappe-bench/apps/frappe/frappe/app.py", line 108, in init_request frappe.init(site=site, si...
KeyError
def execute(): frappe.reload_doc("desk", "doctype", "dashboard_chart") if not frappe.db.table_exists("Dashboard Chart"): return users_with_permission = frappe.get_all( "Has Role", fields=["parent"], filters={ "role": ["in", ["System Manager", "Dashboard Manager"...
def execute(): frappe.reload_doc("desk", "doctype", "dashboard_chart") if not frappe.db.table_exists("Dashboard Chart"): return users_with_permission = frappe.get_all( "Has Role", fields=["parent"], filters={ "role": ["in", ["System Manager", "Dashboard Manager"...
https://github.com/frappe/frappe/issues/10205
Executing frappe.patches.v13_0.set_existing_dashboard_charts_as_public in v12up.localhost (_b0f4a3ee8e7b5021) Syntax error in query: UPDATE `tabDashboard Chart` SET `tabDashboard Chart`.`is_public`=1 WHERE `tabDashboard Chart`.owner in ('Administrator',) Traceback (most recent call last): File "/usr/lib/python3.7/run...
pymysql.err.ProgrammingError
def get_result(doc, to_date=None): doc = frappe.parse_json(doc) fields = [] sql_function_map = { "Count": "count", "Sum": "sum", "Average": "avg", "Minimum": "min", "Maximum": "max", } function = sql_function_map[doc.function] if function == "count": ...
def get_result(doc, to_date=None): doc = frappe.parse_json(doc) fields = [] sql_function_map = { "Count": "count", "Sum": "sum", "Average": "avg", "Minimum": "min", "Maximum": "max", } function = sql_function_map[doc.function] if function == "count": ...
https://github.com/frappe/frappe/issues/10156
Traceback (most recent call last): 19:47:45 web.1 | File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 62, in application 19:47:45 web.1 | response = frappe.api.handle() 19:47:45 web.1 | File "/home/frappe/frappe-bench/apps/frappe/frappe/api.py", line 58, in handle...
pymysql.err.InternalError
def rebuild_for_doctype(doctype): """ Rebuild entries of doctype's documents in __global_search on change of searchable fields :param doctype: Doctype """ if frappe.local.conf.get("disable_global_search"): return if frappe.local.conf.get("disable_global_search"): return ...
def rebuild_for_doctype(doctype): """ Rebuild entries of doctype's documents in __global_search on change of searchable fields :param doctype: Doctype """ if frappe.local.conf.get("disable_global_search"): return if frappe.local.conf.get("disable_global_search"): return ...
https://github.com/frappe/frappe/issues/8779
Traceback (most recent call last): File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/bob/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module> main() File "/home/...
pymysql.err.ProgrammingError
def get_transitions(doc, workflow=None): """Return list of possible transitions for the given doc""" doc = frappe.get_doc(frappe.parse_json(doc)) if doc.is_new(): return [] frappe.has_permission(doc.doctype, "read", throw=True) roles = frappe.get_roles() if not workflow: workf...
def get_transitions(doc, workflow=None): """Return list of possible transitions for the given doc""" doc = frappe.get_doc(frappe.parse_json(doc)) if doc.is_new(): return [] frappe.has_permission(doc, "read", throw=True) roles = frappe.get_roles() if not workflow: workflow = ge...
https://github.com/frappe/frappe/issues/5448
Traceback (most recent call last): File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 62, in application response = frappe.handler.handle() File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 22, in handle data = execute_cmd(cmd) File "/home/frappe/frappe-bench/apps/frappe/frappe/handler....
TypeError
def normalize_launch_params(params: Dict) -> None: if "env" in params: params["env"] = {name: str(value) for [name, value] in params["env"].items()} if "ignoreDefaultArgs" in params: if params["ignoreDefaultArgs"] is True: params["ignoreAllDefaultArgs"] = True del params[...
def normalize_launch_params(params: Dict) -> None: if "env" in params: params["env"] = {name: str(value) for [name, value] in params["env"].items()} if "ignoreDefaultArgs" in params: if isinstance(params["ignoreDefaultArgs"], bool): params["ignoreAllDefaultArgs"] = True d...
https://github.com/microsoft/playwright-python/issues/189
Traceback (most recent call last): File "/home/user/.local/lib/python3.8/site-packages/playwright/browser_type.py", line 68, in launch return from_channel(await self._channel.send("launch", params)) File "/home/user/.local/lib/python3.8/site-packages/playwright/connection.py", line 39, in send result = await callback.f...
playwright.helper.TimeoutError
def __init__(self, parent, config, imtypes): # Settting the GUI size and panels design displays = ( wx.Display(i) for i in range(wx.Display.GetCount()) ) # Gets the number of displays screenSizes = [ display.GetGeometry().GetSize() for display in displays ] # Gets the size of each ...
def __init__(self, parent, config, imtypes): # Settting the GUI size and panels design displays = ( wx.Display(i) for i in range(wx.Display.GetCount()) ) # Gets the number of displays screenSizes = [ display.GetGeometry().GetSize() for display in displays ] # Gets the size of each ...
https://github.com/DeepLabCut/DeepLabCut/issues/1110
pythonw -m deeplabcut Starting GUI... Found new frames.. Traceback (most recent call last): File "/Users/brandonjackson/opt/miniconda3/envs/dlc/lib/python3.7/site-packages/deeplabcut/generate_training_dataset/labeling_toolbox.py", line 767, in nextImage self.updatedCoords = MainFrame.getLabels(self, self.iter) File "/U...
IndexError
def browseDir(self, event): """ Show the DirDialog and ask the user to change the directory where machine labels are stored """ self.statusbar.SetStatusText("Looking for a folder to start labeling...") cwd = os.path.join(os.getcwd(), "labeled-data") dlg = wx.DirDialog( self, "Cho...
def browseDir(self, event): """ Show the DirDialog and ask the user to change the directory where machine labels are stored """ self.statusbar.SetStatusText("Looking for a folder to start labeling...") cwd = os.path.join(os.getcwd(), "labeled-data") dlg = wx.DirDialog( self, "Cho...
https://github.com/DeepLabCut/DeepLabCut/issues/1110
pythonw -m deeplabcut Starting GUI... Found new frames.. Traceback (most recent call last): File "/Users/brandonjackson/opt/miniconda3/envs/dlc/lib/python3.7/site-packages/deeplabcut/generate_training_dataset/labeling_toolbox.py", line 767, in nextImage self.updatedCoords = MainFrame.getLabels(self, self.iter) File "/U...
IndexError
def saveDataSet(self, event): """ Saves the final dataframe """ self.statusbar.SetStatusText("File saved") MainFrame.saveEachImage(self) MainFrame.updateZoomPan(self) # Windows compatible self.dataFrame.sort_index(inplace=True) self.dataFrame = self.dataFrame.reindex( self.b...
def saveDataSet(self, event): """ Saves the final dataframe """ # Backup previous save from sys import platform csv_path = os.path.join(self.dir, "CollectedData_" + self.scorer + ".csv") hdf_path = os.path.join(self.dir, "CollectedData_" + self.scorer + ".h5") csv_backup_path = csv_pat...
https://github.com/DeepLabCut/DeepLabCut/issues/1110
pythonw -m deeplabcut Starting GUI... Found new frames.. Traceback (most recent call last): File "/Users/brandonjackson/opt/miniconda3/envs/dlc/lib/python3.7/site-packages/deeplabcut/generate_training_dataset/labeling_toolbox.py", line 767, in nextImage self.updatedCoords = MainFrame.getLabels(self, self.iter) File "/U...
IndexError
def __init__(self, parent, config): # Settting the GUI size and panels design displays = ( wx.Display(i) for i in range(wx.Display.GetCount()) ) # Gets the number of displays screenSizes = [ display.GetGeometry().GetSize() for display in displays ] # Gets the size of each display ...
def __init__(self, parent, config): # Settting the GUI size and panels design displays = ( wx.Display(i) for i in range(wx.Display.GetCount()) ) # Gets the number of displays screenSizes = [ display.GetGeometry().GetSize() for display in displays ] # Gets the size of each display ...
https://github.com/DeepLabCut/DeepLabCut/issues/1110
pythonw -m deeplabcut Starting GUI... Found new frames.. Traceback (most recent call last): File "/Users/brandonjackson/opt/miniconda3/envs/dlc/lib/python3.7/site-packages/deeplabcut/generate_training_dataset/labeling_toolbox.py", line 767, in nextImage self.updatedCoords = MainFrame.getLabels(self, self.iter) File "/U...
IndexError
def browseDir(self, event): """ Show the DirDialog and ask the user to change the directory where machine labels are stored """ self.statusbar.SetStatusText("Looking for a folder to start labeling...") cwd = os.path.join(os.getcwd(), "labeled-data") dlg = wx.DirDialog( self, "Cho...
def browseDir(self, event): """ Show the DirDialog and ask the user to change the directory where machine labels are stored """ self.statusbar.SetStatusText("Looking for a folder to start labeling...") cwd = os.path.join(os.getcwd(), "labeled-data") dlg = wx.DirDialog( self, "Cho...
https://github.com/DeepLabCut/DeepLabCut/issues/1110
pythonw -m deeplabcut Starting GUI... Found new frames.. Traceback (most recent call last): File "/Users/brandonjackson/opt/miniconda3/envs/dlc/lib/python3.7/site-packages/deeplabcut/generate_training_dataset/labeling_toolbox.py", line 767, in nextImage self.updatedCoords = MainFrame.getLabels(self, self.iter) File "/U...
IndexError
def saveDataSet(self, event): """ Saves the final dataframe """ self.statusbar.SetStatusText("File saved") MainFrame.saveEachImage(self) MainFrame.updateZoomPan(self) # Windows compatible self.dataFrame.sort_index(inplace=True) # Discard data associated with bodyparts that are no lo...
def saveDataSet(self, event): """ Saves the final dataframe """ # Backup previous save from sys import platform csv_path = os.path.join(self.dir, "CollectedData_" + self.scorer + ".csv") hdf_path = os.path.join(self.dir, "CollectedData_" + self.scorer + ".h5") csv_backup_path = csv_path...
https://github.com/DeepLabCut/DeepLabCut/issues/1110
pythonw -m deeplabcut Starting GUI... Found new frames.. Traceback (most recent call last): File "/Users/brandonjackson/opt/miniconda3/envs/dlc/lib/python3.7/site-packages/deeplabcut/generate_training_dataset/labeling_toolbox.py", line 767, in nextImage self.updatedCoords = MainFrame.getLabels(self, self.iter) File "/U...
IndexError
def create_training_dataset( config, num_shuffles=1, Shuffles=None, windows2linux=False, userfeedback=False, trainIndices=None, testIndices=None, net_type=None, augmenter_type=None, ): """ Creates a training dataset. Labels from all the extracted frames are merged into a sing...
def create_training_dataset( config, num_shuffles=1, Shuffles=None, windows2linux=False, userfeedback=False, trainIndices=None, testIndices=None, net_type=None, augmenter_type=None, ): """ Creates a training dataset. Labels from all the extracted frames are merged into a sing...
https://github.com/DeepLabCut/DeepLabCut/issues/1110
pythonw -m deeplabcut Starting GUI... Found new frames.. Traceback (most recent call last): File "/Users/brandonjackson/opt/miniconda3/envs/dlc/lib/python3.7/site-packages/deeplabcut/generate_training_dataset/labeling_toolbox.py", line 767, in nextImage self.updatedCoords = MainFrame.getLabels(self, self.iter) File "/U...
IndexError
def create_training_model_comparison( config, trainindex=0, num_shuffles=1, net_types=["resnet_50"], augmenter_types=["default"], userfeedback=False, windows2linux=False, ): """ Creates a training dataset with different networks and augmentation types (dataset_loader) so that the shu...
def create_training_model_comparison( config, trainindex=0, num_shuffles=1, net_types=["resnet_50"], augmenter_types=["default"], userfeedback=False, windows2linux=False, ): """ Creates a training dataset with different networks and augmentation types (dataset_loader) so that the shu...
https://github.com/DeepLabCut/DeepLabCut/issues/1110
pythonw -m deeplabcut Starting GUI... Found new frames.. Traceback (most recent call last): File "/Users/brandonjackson/opt/miniconda3/envs/dlc/lib/python3.7/site-packages/deeplabcut/generate_training_dataset/labeling_toolbox.py", line 767, in nextImage self.updatedCoords = MainFrame.getLabels(self, self.iter) File "/U...
IndexError
def __init__(self, **kwds): GLGraphicsItem.__init__(self) glopts = kwds.pop("glOptions", "additive") self.setGLOptions(glopts) self.pos = None self.size = 10 self.color = [1.0, 1.0, 1.0, 0.5] self.pxMode = True # self.vbo = {} ## VBO does not appear to improve performance very much....
def __init__(self, **kwds): GLGraphicsItem.__init__(self) glopts = kwds.pop("glOptions", "additive") self.setGLOptions(glopts) self.pos = [] self.size = 10 self.color = [1.0, 1.0, 1.0, 0.5] self.pxMode = True # self.vbo = {} ## VBO does not appear to improve performance very much. ...
https://github.com/pyqtgraph/pyqtgraph/issues/1347
|==============================>> | Traceback (most recent call last): | File "filename.py", line 358, in <module> | sys.exit(app.exec_()) | File "...\AppData\Roaming\Python\Python38\site-packages\pyqtgraph\opengl\GLViewWidget.py", line 193, in paintGL | self.drawItemTree(useItemNames=useItemNames) | ...
AttributeError
def paint(self): if self.pos is None: return self.setupGLState() glEnable(GL_POINT_SPRITE) glActiveTexture(GL_TEXTURE0) glEnable(GL_TEXTURE_2D) glBindTexture(GL_TEXTURE_2D, self.pointTexture) glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE) # glTexEnvi(GL_TEXTURE_ENV, GL...
def paint(self): self.setupGLState() glEnable(GL_POINT_SPRITE) glActiveTexture(GL_TEXTURE0) glEnable(GL_TEXTURE_2D) glBindTexture(GL_TEXTURE_2D, self.pointTexture) glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE) # glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE) ## use ...
https://github.com/pyqtgraph/pyqtgraph/issues/1347
|==============================>> | Traceback (most recent call last): | File "filename.py", line 358, in <module> | sys.exit(app.exec_()) | File "...\AppData\Roaming\Python\Python38\site-packages\pyqtgraph\opengl\GLViewWidget.py", line 193, in paintGL | self.drawItemTree(useItemNames=useItemNames) | ...
AttributeError
def keyPressEvent(self, ev): if not self.hasTimeAxis(): super().keyPressEvent(ev) return if ev.key() == QtCore.Qt.Key_Space: if self.playRate == 0: self.play() else: self.play(0) ev.accept() elif ev.key() == QtCore.Qt.Key_Home: self.se...
def keyPressEvent(self, ev): # print ev.key() if ev.key() == QtCore.Qt.Key_Space: if self.playRate == 0: self.play() else: self.play(0) ev.accept() elif ev.key() == QtCore.Qt.Key_Home: self.setCurrentIndex(0) self.play(0) ev.accept() ...
https://github.com/pyqtgraph/pyqtgraph/issues/1545
Traceback (most recent call last): File "D:\Repositories\Art\pyqtgraph\pyqtgraph\imageview\ImageView.py", line 452, in keyPressEvent self.evalKeyState() File "D:\Repositories\Art\pyqtgraph\pyqtgraph\imageview\ImageView.py", line 476, in evalKeyState self.jumpFrames(1) File "D:\Repositories\Art\pyqtgraph\pyqtgraph\image...
KeyError
def keyReleaseEvent(self, ev): if not self.hasTimeAxis(): super().keyReleaseEvent(ev) return if ev.key() in [QtCore.Qt.Key_Space, QtCore.Qt.Key_Home, QtCore.Qt.Key_End]: ev.accept() elif ev.key() in self.noRepeatKeys: ev.accept() if ev.isAutoRepeat(): ret...
def keyReleaseEvent(self, ev): if ev.key() in [QtCore.Qt.Key_Space, QtCore.Qt.Key_Home, QtCore.Qt.Key_End]: ev.accept() elif ev.key() in self.noRepeatKeys: ev.accept() if ev.isAutoRepeat(): return try: del self.keysPressed[ev.key()] except: ...
https://github.com/pyqtgraph/pyqtgraph/issues/1545
Traceback (most recent call last): File "D:\Repositories\Art\pyqtgraph\pyqtgraph\imageview\ImageView.py", line 452, in keyPressEvent self.evalKeyState() File "D:\Repositories\Art\pyqtgraph\pyqtgraph\imageview\ImageView.py", line 476, in evalKeyState self.jumpFrames(1) File "D:\Repositories\Art\pyqtgraph\pyqtgraph\image...
KeyError
def timeIndex(self, slider): ## Return the time and frame index indicated by a slider if not self.hasTimeAxis(): return (0, 0) t = slider.value() xv = self.tVals if xv is None: ind = int(t) else: if len(xv) < 2: return (0, 0) totTime = xv[-1] + (xv[-...
def timeIndex(self, slider): ## Return the time and frame index indicated by a slider if self.image is None: return (0, 0) t = slider.value() xv = self.tVals if xv is None: ind = int(t) else: if len(xv) < 2: return (0, 0) totTime = xv[-1] + (xv[-1] -...
https://github.com/pyqtgraph/pyqtgraph/issues/1545
Traceback (most recent call last): File "D:\Repositories\Art\pyqtgraph\pyqtgraph\imageview\ImageView.py", line 452, in keyPressEvent self.evalKeyState() File "D:\Repositories\Art\pyqtgraph\pyqtgraph\imageview\ImageView.py", line 476, in evalKeyState self.jumpFrames(1) File "D:\Repositories\Art\pyqtgraph\pyqtgraph\image...
KeyError
def roiChanged(self): # Extract image data from ROI if self.image is None: return image = self.getProcessedImage() # getArrayRegion axes should be (x, y) of data array for col-major, # (y, x) for row-major # can't just transpose input because ROI is axisOrder aware colmaj = self.im...
def roiChanged(self): if self.image is None: return image = self.getProcessedImage() # Extract image data from ROI axes = (self.axes["x"], self.axes["y"]) data, coords = self.roi.getArrayRegion( image.view(np.ndarray), self.imageItem, returnMappedCoords=True ) if data is N...
https://github.com/pyqtgraph/pyqtgraph/issues/1280
Traceback (most recent call last): File "/Users/ogi/Developer/pyqtgraph/pyqtgraph/imageview/ImageView.py", line 566, in roiClicked self.roiChanged() File "/Users/ogi/Developer/pyqtgraph/pyqtgraph/imageview/ImageView.py", line 640, in roiChanged self.roiCurves[i].setData(x, y, pen=p) File "/Users/ogi/Developer/pyqtgraph...
Exception
def setParentItem(self, p): ret = GraphicsWidget.setParentItem(self, p) if self.opts["offset"] is not None: offset = Point(self.opts["offset"]) anchorx = 1 if offset[0] <= 0 else 0 anchory = 1 if offset[1] <= 0 else 0 anchor = (anchorx, anchory) self.anchor(itemPos=anchor...
def setParentItem(self, p): ret = GraphicsWidget.setParentItem(self, p) if self.offset is not None: offset = Point(self.opts["offset"]) anchorx = 1 if offset[0] <= 0 else 0 anchory = 1 if offset[1] <= 0 else 0 anchor = (anchorx, anchory) self.anchor(itemPos=anchor, parent...
https://github.com/pyqtgraph/pyqtgraph/issues/1094
Traceback (most recent call last): File "/home/vin/test/testlegend.py", line 7, in <module> l.setParentItem(plt.graphicsItem()) File "/home/vin/miniconda3/lib/python3.7/site-packages/pyqtgraph/graphicsItems/LegendItem.py", line 128, in setParentItem offset = Point(self.opts['offset']) File "/home/vin/miniconda3/lib/pyt...
TypeError
def checkOpenGLVersion(self, msg): ## Only to be called from within exception handler. ver = glGetString(GL_VERSION).split()[0] if int(ver.split(b".")[0]) < 2: from .. import debug debug.printExc() raise Exception( msg + " The original exception is printed ab...
def checkOpenGLVersion(self, msg): ## Only to be called from within exception handler. ver = glGetString(GL_VERSION).split()[0] if int(ver.split(".")[0]) < 2: from .. import debug debug.printExc() raise Exception( msg + " The original exception is printed abo...
https://github.com/pyqtgraph/pyqtgraph/issues/261
Using PyQt5 (default graphics system) Traceback (most recent call last): File "D:\WinPython\basedir34\buildQt5\winpython-3.4.4.amd64\python-3.4.4.amd64 \lib\site-packages\pyqtgraph\opengl\GLViewWidget.py", line 55, in addItem item.initializeGL() File "D:\WinPython\basedir34\buildQt5\winpython-3.4.4.amd64\python-3.4.4.a...
OpenGL.error.GLError
def __init__(self, pos, color, mode=None): """ =============== ============================================================== **Arguments:** pos Array of positions where each color is defined color Array of colors. Values are interpreted via ...
def __init__(self, pos, color, mode=None): """ =============== ============================================================== **Arguments:** pos Array of positions where each color is defined color Array of RGBA colors. Integer data types are...
https://github.com/pyqtgraph/pyqtgraph/issues/1009
Traceback (most recent call last): File "test.py", line 13, in <module> cmap.getLookupTable() # Does not work File "...\venv\lib\site-packages\pyqtgraph\colormap.py", line 223, in getLookupTable alpha = self.usesAlpha() File "...\venv\lib\site-packages\pyqtgraph\colormap.py", line 236, in usesAlpha return np.any(self....
IndexError
def getLookupTable(self, start=0.0, stop=1.0, nPts=512, alpha=None, mode="byte"): """ Return an RGB(A) lookup table (ndarray). =============== ============================================================================= **Arguments:** start The starting value in the lookup table (def...
def getLookupTable(self, start=0.0, stop=1.0, nPts=512, alpha=None, mode="byte"): """ Return an RGB(A) lookup table (ndarray). =============== ============================================================================= **Arguments:** start The starting value in the lookup table (def...
https://github.com/pyqtgraph/pyqtgraph/issues/1009
Traceback (most recent call last): File "test.py", line 13, in <module> cmap.getLookupTable() # Does not work File "...\venv\lib\site-packages\pyqtgraph\colormap.py", line 223, in getLookupTable alpha = self.usesAlpha() File "...\venv\lib\site-packages\pyqtgraph\colormap.py", line 236, in usesAlpha return np.any(self....
IndexError
def __init__( self, region=None, host=None, session_cls=None, request_timeout_seconds=None, max_retry_attempts=None, base_backoff_ms=None, ): self._tables = {} self.host = host self._local = local() self._requests_session = None self._client = None if region: ...
def __init__( self, region=None, host=None, session_cls=None, request_timeout_seconds=None, max_retry_attempts=None, base_backoff_ms=None, ): self._tables = {} self.host = host self._session = None self._requests_session = None self._client = None if region: s...
https://github.com/pynamodb/PynamoDB/issues/153
Traceback (most recent call last): File "./instrumentation/utils.py", line 69, in save_driver_log driver_log.save() File "/app/.heroku/python/lib/python2.7/site-packages/pynamodb/models.py", line 379, in save data = self._get_connection().put_item(*args, **kwargs) File "/app/.heroku/python/lib/python2.7/site-packages/p...
KeyError
def session(self): """ Returns a valid botocore session """ # botocore client creation is not thread safe as of v1.2.5+ (see issue #153) if getattr(self._local, "session", None) is None: self._local.session = get_session() return self._local.session
def session(self): """ Returns a valid botocore session """ if self._session is None: self._session = get_session() return self._session
https://github.com/pynamodb/PynamoDB/issues/153
Traceback (most recent call last): File "./instrumentation/utils.py", line 69, in save_driver_log driver_log.save() File "/app/.heroku/python/lib/python2.7/site-packages/pynamodb/models.py", line 379, in save data = self._get_connection().put_item(*args, **kwargs) File "/app/.heroku/python/lib/python2.7/site-packages/p...
KeyError
def update_item( self, attribute, value=None, action=None, condition=None, conditional_operator=None, **expected_values, ): """ Updates an item using the UpdateItem operation. This should be used for updating a single attribute of an item. :param attribute: The name of the ...
def update_item( self, attribute, value=None, action=None, condition=None, conditional_operator=None, **expected_values, ): """ Updates an item using the UpdateItem operation. This should be used for updating a single attribute of an item. :param attribute: The name of the ...
https://github.com/pynamodb/PynamoDB/issues/132
original nicknames: {'name2', 'name3', 'name1'} nicknames to remove: {'name2'} expected result nicknames: {'name3', 'name1'} actual result nicknames: None Traceback (most recent call last): File "mytest.py", line 34, in <module> assert expected_result_nicknames == user.nicknames AssertionError
AssertionError
def update( self, attributes=None, actions=None, condition=None, conditional_operator=None, **expected_values, ): """ Updates an item using the UpdateItem operation. :param attributes: A dictionary of attributes to update in the following format { ...
def update( self, attributes=None, actions=None, condition=None, conditional_operator=None, **expected_values, ): """ Updates an item using the UpdateItem operation. :param attributes: A dictionary of attributes to update in the following format { ...
https://github.com/pynamodb/PynamoDB/issues/132
original nicknames: {'name2', 'name3', 'name1'} nicknames to remove: {'name2'} expected result nicknames: {'name3', 'name1'} actual result nicknames: None Traceback (most recent call last): File "mytest.py", line 34, in <module> assert expected_result_nicknames == user.nicknames AssertionError
AssertionError
def _get_nearest_labels_for(self, labels): already_sampled_negative_labels = set() for label in labels: plausible_labels = [] plausible_label_probabilities = [] for plausible_label in self.label_nearest_map[label]: if plausible_label in already_sampled_negative_labels: ...
def _get_nearest_labels_for(self, labels): already_sampled_negative_labels = set() for label in labels: plausible_labels = [] plausible_label_probabilities = [] for plausible_label in self.label_nearest_map[label]: if plausible_label in already_sampled_negative_labels: ...
https://github.com/flairNLP/flair/issues/1925
Traceback (most recent call last): File "/home/khalder/prod_stuff/latest_flair/flair/flair/trainers/trainer.py", line 371, in train loss = self.model.forward_loss(batch_step) File "/home/khalder/prod_stuff/latest_flair/flair/flair/models/text_classification_model.py", line 793, in forward_loss sentences = self._get_tar...
ValueError
def __init__( self, model: str = "bert-base-uncased", layers: str = "-1,-2,-3,-4", pooling_operation: str = "first", batch_size: int = 1, use_scalar_mix: bool = False, fine_tune: bool = False, allow_long_sentences: bool = True, **kwargs, ): """ Bidirectional transformer embed...
def __init__( self, model: str = "bert-base-uncased", layers: str = "-1,-2,-3,-4", pooling_operation: str = "first", batch_size: int = 1, use_scalar_mix: bool = False, fine_tune: bool = False, allow_long_sentences: bool = True, **kwargs, ): """ Bidirectional transformer embed...
https://github.com/flairNLP/flair/issues/2008
Traceback (most recent call last): File "test.py", line 8, in <module> model.embed(Sentence("tiago")) File "/home/tiago/.local/lib/python3.8/site-packages/flair/embeddings/base.py", line 60, in embed self._add_embeddings_internal(sentences) File "/home/tiago/.local/lib/python3.8/site-packages/flair/embeddings/token.py"...
TypeError
def _add_embeddings_to_sentences(self, sentences: List[Sentence]): """Match subtokenization to Flair tokenization and extract embeddings from transformers for each token.""" # first, subtokenize each sentence and find out into how many subtokens each token was divided subtokenized_sentences = [] subtok...
def _add_embeddings_to_sentences(self, sentences: List[Sentence]): """Match subtokenization to Flair tokenization and extract embeddings from transformers for each token.""" # first, subtokenize each sentence and find out into how many subtokens each token was divided subtokenized_sentences = [] subtok...
https://github.com/flairNLP/flair/issues/2008
Traceback (most recent call last): File "test.py", line 8, in <module> model.embed(Sentence("tiago")) File "/home/tiago/.local/lib/python3.8/site-packages/flair/embeddings/base.py", line 60, in embed self._add_embeddings_internal(sentences) File "/home/tiago/.local/lib/python3.8/site-packages/flair/embeddings/token.py"...
TypeError
def _convert_lines_to_sentence(self, lines): sentence: Sentence = Sentence() for line in lines: # skip comments if self.comment_symbol is not None and line.startswith(self.comment_symbol): continue # if sentence ends, convert and return if self.__line_completes_sente...
def _convert_lines_to_sentence(self, lines): sentence: Sentence = Sentence() for line in lines: # skip comments if self.comment_symbol is not None and line.startswith(self.comment_symbol): continue # if sentence ends, convert and return if self.__line_completes_sente...
https://github.com/flairNLP/flair/issues/1747
--------------------------------------------------------------------------- OSError Traceback (most recent call last) <ipython-input-5-2f413379aedd> in <module> 6 7 # load the NER tagger ----> 8 tagger = SequenceTagger.load('best-model.pt') 9 10 c:\users\nicod\miniconda3\lib\site-pack...
OSError
def __init__( self, model: str = "bert-base-uncased", layers: str = "all", subtoken_pooling: str = "first", layer_mean: bool = True, fine_tune: bool = False, allow_long_sentences: bool = True, use_context: Union[bool, int] = False, memory_effective_training: bool = True, respect_...
def __init__( self, model: str = "bert-base-uncased", layers: str = "all", subtoken_pooling: str = "first", layer_mean: bool = True, fine_tune: bool = False, allow_long_sentences: bool = True, use_context: Union[bool, int] = False, **kwargs, ): """ Bidirectional transformer e...
https://github.com/flairNLP/flair/issues/1747
--------------------------------------------------------------------------- OSError Traceback (most recent call last) <ipython-input-5-2f413379aedd> in <module> 6 7 # load the NER tagger ----> 8 tagger = SequenceTagger.load('best-model.pt') 9 10 c:\users\nicod\miniconda3\lib\site-pack...
OSError
def _add_embeddings_to_sentence(self, sentence: Sentence): """Match subtokenization to Flair tokenization and extract embeddings from transformers for each token.""" # TODO: keep for backwards compatibility, but remove in future # some pretrained models do not have this property, applying default settings ...
def _add_embeddings_to_sentence(self, sentence: Sentence): """Match subtokenization to Flair tokenization and extract embeddings from transformers for each token.""" # TODO: keep for backwards compatibility, but remove in future # some pretrained models do not have this property, applying default settings ...
https://github.com/flairNLP/flair/issues/1747
--------------------------------------------------------------------------- OSError Traceback (most recent call last) <ipython-input-5-2f413379aedd> in <module> 6 7 # load the NER tagger ----> 8 tagger = SequenceTagger.load('best-model.pt') 9 10 c:\users\nicod\miniconda3\lib\site-pack...
OSError
def _expand_sentence_with_context(self, sentence): # remember original sentence original_sentence = sentence # get left context left_context = "" while True: sentence = sentence.previous_sentence() if sentence is None: break if self.respect_document_boundaries an...
def _expand_sentence_with_context(self, sentence): # remember original sentence original_sentence = sentence # get left context left_context = "" while True: sentence = sentence.previous_sentence() if sentence is None: break if sentence.is_document_boundary: ...
https://github.com/flairNLP/flair/issues/1747
--------------------------------------------------------------------------- OSError Traceback (most recent call last) <ipython-input-5-2f413379aedd> in <module> 6 7 # load the NER tagger ----> 8 tagger = SequenceTagger.load('best-model.pt') 9 10 c:\users\nicod\miniconda3\lib\site-pack...
OSError
def embedding_length(self) -> int: if "embedding_length_internal" in self.__dict__.keys(): return self.embedding_length_internal # """Returns the length of the embedding vector.""" if not self.layer_mean: length = len(self.layer_indexes) * self.model.config.hidden_size else: len...
def embedding_length(self) -> int: """Returns the length of the embedding vector.""" if not self.layer_mean: length = len(self.layer_indexes) * self.model.config.hidden_size else: length = self.model.config.hidden_size if self.pooling_operation == "first_last": length *= 2 ...
https://github.com/flairNLP/flair/issues/1747
--------------------------------------------------------------------------- OSError Traceback (most recent call last) <ipython-input-5-2f413379aedd> in <module> 6 7 # load the NER tagger ----> 8 tagger = SequenceTagger.load('best-model.pt') 9 10 c:\users\nicod\miniconda3\lib\site-pack...
OSError
def __getstate__(self): # special handling for serializing transformer models config_state_dict = self.model.config.__dict__ model_state_dict = self.model.state_dict() # serialize the transformer models and the constructor arguments (but nothing else) model_state = { "config_state_dict": co...
def __getstate__(self): state = self.__dict__.copy() state["tokenizer"] = None return state
https://github.com/flairNLP/flair/issues/1747
--------------------------------------------------------------------------- OSError Traceback (most recent call last) <ipython-input-5-2f413379aedd> in <module> 6 7 # load the NER tagger ----> 8 tagger = SequenceTagger.load('best-model.pt') 9 10 c:\users\nicod\miniconda3\lib\site-pack...
OSError
def __setstate__(self, d): self.__dict__ = d # necessary for reverse compatibility with Flair <= 0.7 if "use_scalar_mix" in self.__dict__.keys(): self.__dict__["layer_mean"] = d["use_scalar_mix"] if not "memory_effective_training" in self.__dict__.keys(): self.__dict__["memory_effective...
def __setstate__(self, d): self.__dict__ = d # reload tokenizer to get around serialization issues model_name = self.name.split("transformer-word-")[-1] try: self.tokenizer = AutoTokenizer.from_pretrained(model_name) except: pass
https://github.com/flairNLP/flair/issues/1747
--------------------------------------------------------------------------- OSError Traceback (most recent call last) <ipython-input-5-2f413379aedd> in <module> 6 7 # load the NER tagger ----> 8 tagger = SequenceTagger.load('best-model.pt') 9 10 c:\users\nicod\miniconda3\lib\site-pack...
OSError
def _add_embeddings_internal(self, sentences: List[Sentence]) -> List[Sentence]: for i, sentence in enumerate(sentences): language_code = sentence.get_language_code() supported = [ "en", "de", "bg", "ca", "hr", "cs", ...
def _add_embeddings_internal(self, sentences: List[Sentence]) -> List[Sentence]: for i, sentence in enumerate(sentences): language_code = sentence.get_language_code() supported = [ "en", "de", "bg", "ca", "hr", "cs", ...
https://github.com/flairNLP/flair/issues/1841
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-26-1ee39d7138b3> in <module>() ----> 1 df_test['flair'] = df_test['word'].apply(lambda x: flair_lstm(x)) 10 frames pandas/_libs/lib.pyx in pandas._libs....
AttributeError
def _fetch_model(model_name) -> str: model_map = {} hu_path: str = "https://nlp.informatik.hu-berlin.de/resources/models" model_map["de-offensive-language"] = "/".join( [hu_path, "de-offensive-language", "germ-eval-2018-task-1-v0.4.pt"] ) # English sentiment models model_map["sentiment...
def _fetch_model(model_name) -> str: model_map = {} hu_path: str = "https://nlp.informatik.hu-berlin.de/resources/models" model_map["de-offensive-language"] = "/".join( [hu_path, "de-offensive-language", "germ-eval-2018-task-1-v0.4.pt"] ) # English sentiment models model_map["sentiment...
https://github.com/flairNLP/flair/issues/1841
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-26-1ee39d7138b3> in <module>() ----> 1 df_test['flair'] = df_test['word'].apply(lambda x: flair_lstm(x)) 10 frames pandas/_libs/lib.pyx in pandas._libs....
AttributeError
def __init__( self, model: str = "bert-base-uncased", layers: str = "-1,-2,-3,-4", pooling_operation: str = "first", batch_size: int = 1, use_scalar_mix: bool = False, fine_tune: bool = False, allow_long_sentences: bool = True, **kwargs, ): """ Bidirectional transformer embed...
def __init__( self, model: str = "bert-base-uncased", layers: str = "-1,-2,-3,-4", pooling_operation: str = "first", batch_size: int = 1, use_scalar_mix: bool = False, fine_tune: bool = False, allow_long_sentences: bool = False, **kwargs, ): """ Bidirectional transformer embe...
https://github.com/flairNLP/flair/issues/1690
---------------------------------------------------------------------------------------------------- 2020-06-12 18:44:49,152 Model training base path: "dialogpt" 2020-06-12 18:44:49,152 ---------------------------------------------------------------------------------------------------- 2020-06-12 18:44:49,153 Device: ...
TypeError
def extract_weights(self, state_dict, iteration): for key in state_dict.keys(): vec = state_dict[key] # print(vec) try: weights_to_watch = min( self.number_of_weights, reduce(lambda x, y: x * y, list(vec.size())) ) except: continue ...
def extract_weights(self, state_dict, iteration): for key in state_dict.keys(): vec = state_dict[key] weights_to_watch = min( self.number_of_weights, reduce(lambda x, y: x * y, list(vec.size())) ) if key not in self.weights_dict: self._init_weights_index(key,...
https://github.com/flairNLP/flair/issues/1690
---------------------------------------------------------------------------------------------------- 2020-06-12 18:44:49,152 Model training base path: "dialogpt" 2020-06-12 18:44:49,152 ---------------------------------------------------------------------------------------------------- 2020-06-12 18:44:49,153 Device: ...
TypeError
def __setstate__(self, state): self.__dict__ = state if re.fullmatch(r"cuda:[0-9]+", str(flair.device)): cuda_device = int(str(flair.device).split(":")[-1]) elif str(flair.device) == "cpu": cuda_device = -1 else: cuda_device = 0 self.ee.cuda_device = cuda_device self.e...
def __setstate__(self, state): from bpemb.util import sentencepiece_load model_file = self.model_tpl.format(lang=state["lang"], vs=state["vs"]) self.__dict__ = state # write out the binary sentence piece model into the expected directory self.cache_dir: Path = Path(flair.cache_root) / "embeddings"...
https://github.com/flairNLP/flair/issues/1753
RuntimeError Traceback (most recent call last) <ipython-input-21-83d7f894d041> in <module>() ----> classifier.predict(sentence) 12 frames /usr/local/lib/python3.6/dist-packages/flair/models/text_classification_model.py in predict(self, sentences, mini_batch_size, multi_class_prob, verbos...
RuntimeError
def __init__( self, language: str = None, dim: int = 50, syllables: int = 100000, cache_dir=None, model_file_path: Path = None, embedding_file_path: Path = None, **kwargs, ): """ Initializes BP embeddings. Constructor downloads required files if not there. """ if not cach...
def __init__( self, language: str = None, dim: int = 50, syllables: int = 100000, cache_dir=Path(flair.cache_root) / "embeddings", model_file_path: Path = None, embedding_file_path: Path = None, **kwargs, ): """ Initializes BP embeddings. Constructor downloads required files if n...
https://github.com/flairNLP/flair/issues/1483
2020-03-20 13:32:20,184 loading file /home/abhisaar/Downloads/final-model8.pt downloading https://nlp.h-its.org/bpemb/en/en.wiki.bpe.vs100000.model 100%|██████████| 1987533/1987533 [00:01<00:00, 1082354.99B/s] --------------------------------------------------------------------------- FileNotFoundError ...
FileNotFoundError
def _add_embeddings_to_sentences(self, sentences: List[Sentence]): """Match subtokenization to Flair tokenization and extract embeddings from transformers for each token.""" # first, subtokenize each sentence and find out into how many subtokens each token was divided subtokenized_sentences = [] subtok...
def _add_embeddings_to_sentences(self, sentences: List[Sentence]): """Match subtokenization to Flair tokenization and extract embeddings from transformers for each token.""" # first, subtokenize each sentence and find out into how many subtokens each token was divided subtokenized_sentences = [] subtok...
https://github.com/flairNLP/flair/issues/1703
Traceback (most recent call last): File "train_flair.py", line 187, in <module> sys.exit(main(sys.argv[1:])) File "train_flair.py", line 182, in main trainer.train(args.outfolder, checkpoint=True, **hp) File "/opt/conda/lib/python3.6/site-packages/flair/trainers/trainer.py", line 364, in train loss = self.model.forward...
ValueError
def reconstruct_tokens_from_subtokens(self, sentence, subtokens): word_iterator = iter(sentence) token = next(word_iterator) token_text = self._get_processed_token_text(token) token_subtoken_lengths = [] reconstructed_token = "" subtoken_count = 0 # iterate over subtokens and reconstruct tok...
def reconstruct_tokens_from_subtokens(self, sentence, subtokens): word_iterator = iter(sentence) token = next(word_iterator) token_text = self._get_processed_token_text(token) token_subtoken_lengths = [] reconstructed_token = "" subtoken_count = 0 # iterate over subtokens and reconstruct tok...
https://github.com/flairNLP/flair/issues/1703
Traceback (most recent call last): File "train_flair.py", line 187, in <module> sys.exit(main(sys.argv[1:])) File "train_flair.py", line 182, in main trainer.train(args.outfolder, checkpoint=True, **hp) File "/opt/conda/lib/python3.6/site-packages/flair/trainers/trainer.py", line 364, in train loss = self.model.forward...
ValueError
def _fetch_model(model_name) -> str: model_map = {} aws_resource_path_v04 = ( "https://s3.eu-central-1.amazonaws.com/alan-nlp/resources/models-v0.4" ) hu_path: str = "https://nlp.informatik.hu-berlin.de/resources/models" model_map["ner"] = "/".join( [aws_resource_path_v04, "NER-con...
def _fetch_model(model_name) -> str: model_map = {} aws_resource_path_v04 = ( "https://s3.eu-central-1.amazonaws.com/alan-nlp/resources/models-v0.4" ) hu_path: str = "https://nlp.informatik.hu-berlin.de/resources/models" model_map["ner"] = "/".join( [aws_resource_path_v04, "NER-con...
https://github.com/flairNLP/flair/issues/1365
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-8-38968e7669bc> in <module> 5 6 # predict NER tags ----> 7 tagger.predict(sentence) 8 9 # print sentence with predicted tags ~/code/flair/flair/models/s...
AttributeError
def __init__( self, hidden_size: int, embeddings: TokenEmbeddings, tag_dictionary: Dictionary, tag_type: str, use_crf: bool = True, use_rnn: bool = True, rnn_layers: int = 1, dropout: float = 0.0, word_dropout: float = 0.05, locked_dropout: float = 0.5, train_initial_hidd...
def __init__( self, hidden_size: int, embeddings: TokenEmbeddings, tag_dictionary: Dictionary, tag_type: str, use_crf: bool = True, use_rnn: bool = True, rnn_layers: int = 1, dropout: float = 0.0, word_dropout: float = 0.05, locked_dropout: float = 0.5, train_initial_hidd...
https://github.com/flairNLP/flair/issues/1562
... 2020-04-30 14:36:40,370 epoch 1 - iter 96/120 - loss 209973.64290365 - samples/sec: 33.04 2020-04-30 14:36:52,323 epoch 1 - iter 108/120 - loss 208670.76244213 - samples/sec: 32.17 2020-04-30 14:37:03,579 epoch 1 - iter 120/120 - loss 206854.72747396 - samples/sec: 34.17 2020-04-30 14:37:03,594 --------------------...
AssertionError
def _add_embeddings_internal(self, sentences: Union[List[Sentence], Sentence]): """Add embeddings to all sentences in the given list of sentences. If embeddings are already added, update only if embeddings are non-static.""" # TODO: remove in future versions if not hasattr(self, "locked_dropout"): ...
def _add_embeddings_internal(self, sentences: Union[List[Sentence], Sentence]): """Add embeddings to all sentences in the given list of sentences. If embeddings are already added, update only if embeddings are non-static.""" # TODO: remove in future versions if not hasattr(self, "locked_dropout"): ...
https://github.com/flairNLP/flair/issues/1377
AttributeError Traceback (most recent call last) <ipython-input-4-f517a501f1cf> in <module> ----> 1 classifier = TextClassifier.load('en-sentiment') ~/Desktop/flair/flair/nn.py in load(cls, model) 86 state = torch.load(f, map_location=flair.device) 87 ---> 88 model = cls....
AttributeError
def _add_embeddings_internal(self, sentences: List[Sentence]) -> List[Sentence]: self.context_embeddings.embed(sentences) # if we keep a pooling, it needs to be updated continuously for sentence in sentences: for token in sentence.tokens: # update embedding local_embedding =...
def _add_embeddings_internal(self, sentences: List[Sentence]) -> List[Sentence]: self.context_embeddings.embed(sentences) # if we keep a pooling, it needs to be updated continuously for sentence in sentences: for token in sentence.tokens: # update embedding local_embedding =...
https://github.com/flairNLP/flair/issues/1270
2019-11-12 09:10:16,480 Reading data from /home/username/.flair/datasets/conll_03_dutch 2019-11-12 09:10:16,480 Train: /home/username/.flair/datasets/conll_03_dutch/ned.train 2019-11-12 09:10:16,480 Dev: /home/username/.flair/datasets/conll_03_dutch/ned.testa 2019-11-12 09:10:16,480 Test: /home/username/.flair/datasets...
RuntimeError
def _add_embeddings_internal(self, sentences: List[Sentence]) -> List[Sentence]: self.context_embeddings.embed(sentences) # if we keep a pooling, it needs to be updated continuously for sentence in sentences: for token in sentence.tokens: # update embedding local_embedding =...
def _add_embeddings_internal(self, sentences: List[Sentence]) -> List[Sentence]: self.context_embeddings.embed(sentences) # if we keep a pooling, it needs to be updated continuously for sentence in sentences: for token in sentence.tokens: # update embedding local_embedding =...
https://github.com/flairNLP/flair/issues/1270
2019-11-12 09:10:16,480 Reading data from /home/username/.flair/datasets/conll_03_dutch 2019-11-12 09:10:16,480 Train: /home/username/.flair/datasets/conll_03_dutch/ned.train 2019-11-12 09:10:16,480 Dev: /home/username/.flair/datasets/conll_03_dutch/ned.testa 2019-11-12 09:10:16,480 Test: /home/username/.flair/datasets...
RuntimeError
def _add_embeddings_internal(self, sentences: List[Sentence]) -> List[Sentence]: for i, sentence in enumerate(sentences): language_code = sentence.get_language_code() supported = [ "en", "de", "bg", "ca", "hr", "cs", ...
def _add_embeddings_internal(self, sentences: List[Sentence]) -> List[Sentence]: for i, sentence in enumerate(sentences): language_code = sentence.get_language_code() print(language_code) supported = [ "en", "de", "bg", "ca", "hr", ...
https://github.com/flairNLP/flair/issues/1115
2019-09-17 11:47:41,099 read text file with 4 lines 2019-09-17 11:47:41,107 read text file with 4 lines 2019-09-17 11:47:41,205 read text file with 78280 lines 2019-09-17 11:47:41,265 shuffled 2019-09-17 11:48:08,470 Sequence length is 100 2019-09-17 11:48:08,502 Split 1 - (11:48:08) 2019-09-17 11:48:13,678 | split ...
AttributeError
def generate_text( self, prefix: str = "\n", number_of_characters: int = 1000, temperature: float = 1.0, break_on_suffix=None, ) -> Tuple[str, float]: if prefix == "": prefix = "\n" with torch.no_grad(): characters = [] idx2item = self.dictionary.idx2item #...
def generate_text( self, prefix: str = "\n", number_of_characters: int = 1000, temperature: float = 1.0, break_on_suffix=None, ) -> Tuple[str, float]: if prefix == "": prefix = "\n" with torch.no_grad(): characters = [] idx2item = self.dictionary.idx2item #...
https://github.com/flairNLP/flair/issues/1115
2019-09-17 11:47:41,099 read text file with 4 lines 2019-09-17 11:47:41,107 read text file with 4 lines 2019-09-17 11:47:41,205 read text file with 78280 lines 2019-09-17 11:47:41,265 shuffled 2019-09-17 11:48:08,470 Sequence length is 100 2019-09-17 11:48:08,502 Split 1 - (11:48:08) 2019-09-17 11:48:13,678 | split ...
AttributeError
def train( self, base_path: Union[Path, str], sequence_length: int, learning_rate: float = 20, mini_batch_size: int = 100, anneal_factor: float = 0.25, patience: int = 10, clip=0.25, max_epochs: int = 1000, checkpoint: bool = False, grow_to_sequence_length: int = 0, num_w...
def train( self, base_path: Union[Path, str], sequence_length: int, learning_rate: float = 20, mini_batch_size: int = 100, anneal_factor: float = 0.25, patience: int = 10, clip=0.25, max_epochs: int = 1000, checkpoint: bool = False, grow_to_sequence_length: int = 0, num_w...
https://github.com/flairNLP/flair/issues/1115
2019-09-17 11:47:41,099 read text file with 4 lines 2019-09-17 11:47:41,107 read text file with 4 lines 2019-09-17 11:47:41,205 read text file with 78280 lines 2019-09-17 11:47:41,265 shuffled 2019-09-17 11:48:08,470 Sequence length is 100 2019-09-17 11:48:08,502 Split 1 - (11:48:08) 2019-09-17 11:48:13,678 | split ...
AttributeError
def add_file_handler(log, output_file): init_output_file(output_file.parents[0], output_file.name) fh = logging.FileHandler(output_file, mode="w", encoding="utf-8") fh.setLevel(logging.INFO) formatter = logging.Formatter("%(asctime)-15s %(message)s") fh.setFormatter(formatter) log.addHandler(fh)...
def add_file_handler(log, output_file): init_output_file(output_file.parents[0], output_file.name) fh = logging.FileHandler(output_file) fh.setLevel(logging.INFO) formatter = logging.Formatter("%(asctime)-15s %(message)s") fh.setFormatter(formatter) log.addHandler(fh) return fh
https://github.com/flairNLP/flair/issues/718
--- Logging error --- Traceback (most recent call last): File "...\torch\lib\logging\__init__.py", line 1037, in emit stream.write(msg + self.terminator) File "...\torch\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can...
UnicodeEncodeError
def __init__( self, embeddings: List[TokenEmbeddings], hidden_size=128, rnn_layers=1, reproject_words: bool = True, reproject_words_dimension: int = None, bidirectional: bool = False, dropout: float = 0.5, word_dropout: float = 0.0, locked_dropout: float = 0.0, rnn_type="GRU"...
def __init__( self, embeddings: List[TokenEmbeddings], hidden_size=128, rnn_layers=1, reproject_words: bool = True, reproject_words_dimension: int = None, bidirectional: bool = False, dropout: float = 0.5, word_dropout: float = 0.0, locked_dropout: float = 0.0, rnn_type="GRU"...
https://github.com/flairNLP/flair/issues/780
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-19-e27894ad7da5> in <module> 1 assert torch.cuda.is_available(), "Do not run this model with GPU support." 2 # Run model ----> 3 model(config) ~/cloud/m...
KeyError
def __init__( self, text: str = None, use_tokenizer: bool = False, labels: Union[List[Label], List[str]] = None, ): super(Sentence, self).__init__() self.tokens: List[Token] = [] self.labels: List[Label] = [] if labels is not None: self.add_labels(labels) self._embeddings:...
def __init__( self, text: str = None, use_tokenizer: bool = False, labels: Union[List[Label], List[str]] = None, ): super(Sentence, self).__init__() self.tokens: List[Token] = [] self.labels: List[Label] = [] if labels is not None: self.add_labels(labels) self._embeddings:...
https://github.com/flairNLP/flair/issues/565
from flair.data import Sentence s = '' Sentence(s) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\XYZ\AppData\Local\Programs\Python\Python36\lib\site-packages\flair\data.py", line 338, in __init__ index += 1 UnboundLocalError: local variable 'index' referenced before assignment
UnboundLocalError
def _add_embeddings_internal(self, sentences: List[Sentence]) -> List[Sentence]: """Add embeddings to all words in a list of sentences. If embeddings are already added, updates only if embeddings are non-static.""" # first, find longest sentence in batch longest_sentence_in_batch: int = len( ma...
def _add_embeddings_internal(self, sentences: List[Sentence]) -> List[Sentence]: """Add embeddings to all words in a list of sentences. If embeddings are already added, updates only if embeddings are non-static.""" # first, find longest sentence in batch longest_sentence_in_batch: int = len( ma...
https://github.com/flairNLP/flair/issues/325
--------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-1-47fbfcb3fd4f> in <module> 5 BertEmbedding = BertEmbeddings() 6 sent = Sentence('I love Austin') ----> 7 BertEmbedding.embed(sent) 8 # fe.embed(sent) ~...
RuntimeError
def predict( self, sentences: Union[List[Sentence], Sentence], mini_batch_size=32 ) -> List[Sentence]: if type(sentences) is Sentence: sentences = [sentences] # remove previous embeddings clear_embeddings(sentences) # make mini-batches batches = [ sentences[x : x + mini_batch_s...
def predict( self, sentences: Union[List[Sentence], Sentence], mini_batch_size=32 ) -> List[Sentence]: if type(sentences) is Sentence: sentences = [sentences] # make mini-batches batches = [ sentences[x : x + mini_batch_size] for x in range(0, len(sentences), mini_batch_size) ...
https://github.com/flairNLP/flair/issues/23
--------------------------------------------------------------------------- OSError Traceback (most recent call last) <ipython-input-4-4d86fef1ef40> in <module>() ----> 1 tagger = SequenceTagger.load('ner-ontonotes') ~/.virtualenvs/py36/lib/python3.6/site-packages/flair/tagging_model....
OSError
def __init__( self, text: str = None, use_tokenizer: bool = False, labels: List[Label] = None ): super(Sentence, self).__init__() self.tokens: List[Token] = [] self.labels: List[Label] = labels self._embeddings: Dict = {} # if text is passed, instantiate sentence with tokens (words) if t...
def __init__( self, text: str = None, use_tokenizer: bool = False, labels: List[Label] = None ): super(Sentence, self).__init__() self.tokens: List[Token] = [] self.labels: List[Label] = labels self._embeddings: Dict = {} # if text is passed, instantiate sentence with tokens (words) if t...
https://github.com/flairNLP/flair/issues/83
Traceback (most recent call last): File "predict.py", line 8, in <module> tagger.predict(sentence) File "/home/projects/ner/flair/flair/models/sequence_tagger_model.py", line 371, in predict score, tag_seq = self._predict_scores_batch(batch) File "/home/projects/ner/flair/flair/models/sequence_tagger_model.py", line 38...
ValueError
def initialize(self, argv=None): """Initialize application, notebooks, writer, and postprocessor""" # See https://bugs.python.org/issue37373 :( if ( sys.version_info[0] == 3 and sys.version_info[1] >= 8 and sys.platform.startswith("win") ): asyncio.set_event_loop_policy(a...
def initialize(self, argv=None): """Initialize application, notebooks, writer, and postprocessor""" self.init_syspath() super().initialize(argv) self.init_notebooks() self.init_writer() self.init_postprocessor()
https://github.com/jupyter/nbconvert/issues/1372
[NbConvertApp] Converting notebook C:\projects\matplotlib\lib\matplotlib\tests\test_nbagg_01.ipynb to notebook Traceback (most recent call last): File "c:\miniconda37-x64\envs\test-environment\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\miniconda37-x64\envs\test-e...
NotImplementedError
def get_export_names(config=get_config()): """Return a list of the currently supported export targets Exporters can be found in external packages by registering them as an nbconvert.exporter entrypoint. """ exporters = sorted(entrypoints.get_group_named("nbconvert.exporters")) enabled_exporters...
def get_export_names(config=get_config()): """Return a list of the currently supported export targets Exporters can be found in external packages by registering them as an nbconvert.exporter entrypoint. """ exporters = sorted(entrypoints.get_group_named("nbconvert.exporters")) enabled_exporters...
https://github.com/jupyter/nbconvert/issues/1366
Traceback (most recent call last): File "/Users/stslve/miniconda/envs/jlab-master/lib/python3.7/site-packages/tornado/web.py", line 1701, in _execute result = method(*self.path_args, **self.path_kwargs) File "/Users/stslve/miniconda/envs/jlab-master/lib/python3.7/site-packages/tornado/web.py", line 3178, in wrapper ret...
ValueError
def transform(data, func): if compat.USE_PYGEOS: coords = pygeos.get_coordinates(data) new_coords = func(coords[:, 0], coords[:, 1]) result = pygeos.set_coordinates(data.copy(), np.array(new_coords).T) return result else: from shapely.ops import transform n = len...
def transform(data, func): if compat.USE_PYGEOS: coords = pygeos.get_coordinates(data) new_coords = func(coords[:, 0], coords[:, 1]) result = pygeos.set_coordinates(data.copy(), np.array(new_coords).T) return result else: from shapely.ops import transform n = len...
https://github.com/geopandas/geopandas/issues/1573
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) in 15 16 gdf.loc[3,'geometry'] = None ---> 17 gdf.to_crs(epsg=5347) /opt/miniconda3/envs/stable/lib/python3.8/site-packages/geopandas/geodataframe.py in to_crs(self, c...
AttributeError
def _mapclassify_choro(values, scheme, **classification_kwds): """ Wrapper for choropleth schemes from mapclassify for use with plot_dataframe Parameters ---------- values Series to be plotted scheme : str One of mapclassify classification schemes Options are BoxPlot, Eq...
def _mapclassify_choro(values, scheme, **classification_kwds): """ Wrapper for choropleth schemes from mapclassify for use with plot_dataframe Parameters ---------- values Series to be plotted scheme : str One of mapclassify classification schemes Options are BoxPlot, Eq...
https://github.com/geopandas/geopandas/issues/1486
df = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres')) df.plot(column='pop_est', scheme='JenksCaspallSampled') --------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-18-3fe371919d49> in <module> --...
ValueError