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 set_status(self, href, status, account): """sets the status of vcard""" self._check_account(account) sql_s = "UPDATE {0} SET STATUS = ? WHERE href = ?".format(account + "_m") self.sql_ex( sql_s, ( status, href, ), )
def set_status(self, href, status, account): """sets the status of vcard""" sql_s = "UPDATE {0} SET STATUS = ? WHERE href = ?".format(account + "_m") self.sql_ex( sql_s, ( status, href, ), )
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError
def reset_flag(self, href, account): """ resets the status for a given href to 0 (=not edited locally) """ self._check_account(account) sql_s = "UPDATE {0} SET status = ? WHERE href = ?".format(account + "_m") self.sql_ex( sql_s, ( OK, href, ), ...
def reset_flag(self, href, account): """ resets the status for a given href to 0 (=not edited locally) """ sql_s = "UPDATE {0} SET status = ? WHERE href = ?".format(account + "_m") self.sql_ex( sql_s, ( OK, href, ), )
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError
def get_status(self, href, account): """ gets the status of the event associated with href in `account` """ self._check_account(account) sql_s = "SELECT status FROM {0} WHERE href = (?)".format(account + "_m") return self.sql_ex(sql_s, (href,))[0][0]
def get_status(self, href, account): """ gets the status of the event associated with href in `account` """ sql_s = "SELECT status FROM {0} WHERE href = (?)".format(account + "_m") return self.sql_ex(sql_s, (href,))[0][0]
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError
def _sync_caldav(self): syncer = caldav.Syncer( self._resource, user=self._username, password=self._password, verify=self._ssl_verify, auth=self._auth, ) # self._dbtool.check_account_table(self.name) logging.debug("syncing events in the next 365 days") start =...
def _sync_caldav(self): syncer = caldav.Syncer( self._resource, user=self._username, password=self._password, verify=self._ssl_verify, auth=self._auth, ) self._dbtool.check_account_table(self.name) logging.debug("syncing events in the next 365 days") start = d...
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError
def _sync_http(self): """ simple syncer to import events from .ics files """ import icalendar self.syncer = caldav.HTTPSyncer( self._resource, user=self._username, password=self._password, verify=self._ssl_verify, auth=self._auth, ) # self._dbtool.che...
def _sync_http(self): """ simple syncer to import events from .ics files """ import icalendar self.syncer = caldav.HTTPSyncer( self._resource, user=self._username, password=self._password, verify=self._ssl_verify, auth=self._auth, ) self._dbtool.check...
https://github.com/pimutils/khal/issues/7
Traceback (most recent call last): File "/home/catern/src/khal/virt/bin/khal", line 5, in <module> pkg_resources.run_script('khal==0.1.0.dev', 'khal') File "/home/catern/src/khal/virt/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home...
sqlite3.OperationalError
def __init__( self, url: str = "sqlite://", index: str = "document", label_index: str = "label", update_existing_documents: bool = False, ): """ An SQL backed DocumentStore. Currently supports SQLite, PostgreSQL and MySQL backends. :param url: URL for SQL database as expected by SQLAlch...
def __init__( self, url: str = "sqlite://", index: str = "document", label_index: str = "label", update_existing_documents: bool = False, ): """ An SQL backed DocumentStore. Currently supports SQLite, PostgreSQL and MySQL backends. :param url: URL for SQL database as expected by SQLAlch...
https://github.com/deepset-ai/haystack/issues/758
01/21/2021 22:03:34 - INFO - haystack.document_store.faiss - Updating embeddings for 75 docs... 0%| | 0/75 [00:00<?, ?it/s] --------------------------------------------------------------------------- OperationalError Traceback (most recent call last) /usr/local/lib/python3.6/dist-pac...
OperationalError
def get_all_documents_generator( self, index: Optional[str] = None, filters: Optional[Dict[str, List[str]]] = None, return_embedding: Optional[bool] = None, batch_size: int = 10_000, ) -> Generator[Document, None, None]: """ Get documents from the document store. Under-the-hood, documents ar...
def get_all_documents_generator( self, index: Optional[str] = None, filters: Optional[Dict[str, List[str]]] = None, return_embedding: Optional[bool] = None, batch_size: int = 10_000, ) -> Generator[Document, None, None]: """ Get documents from the document store. Under-the-hood, documents ar...
https://github.com/deepset-ai/haystack/issues/758
01/21/2021 22:03:34 - INFO - haystack.document_store.faiss - Updating embeddings for 75 docs... 0%| | 0/75 [00:00<?, ?it/s] --------------------------------------------------------------------------- OperationalError Traceback (most recent call last) /usr/local/lib/python3.6/dist-pac...
OperationalError
def __init__( self, model_name_or_path: str = "facebook/rag-token-nq", retriever: Optional[DensePassageRetriever] = None, generator_type: RAGeneratorType = RAGeneratorType.TOKEN, top_k_answers: int = 2, max_length: int = 200, min_length: int = 2, num_beams: int = 2, embed_title: bool...
def __init__( self, model_name_or_path: str = "facebook/rag-token-nq", retriever: Optional[DensePassageRetriever] = None, generator_type: RAGeneratorType = RAGeneratorType.TOKEN, top_k_answers: int = 2, max_length: int = 200, min_length: int = 2, num_beams: int = 2, embed_title: bool...
https://github.com/deepset-ai/haystack/issues/587
Inferencing Samples: 100%|██████████| 1/1 [00:00<00:00, 56.41 Batches/s] --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-17-42737cee0272> in <module>() 10 question=question, 11 document...
RuntimeError
def predict( self, question: str, documents: List[Document], top_k: Optional[int] = None ) -> Dict: """ Generate the answer to the input question. The generation will be conditioned on the supplied documents. These document can for example be retrieved via the Retriever. :param question: Question ...
def predict( self, question: str, documents: List[Document], top_k: Optional[int] = None ) -> Dict: """ Generate the answer to the input question. The generation will be conditioned on the supplied documents. These document can for example be retrieved via the Retriever. :param question: Question ...
https://github.com/deepset-ai/haystack/issues/587
Inferencing Samples: 100%|██████████| 1/1 [00:00<00:00, 56.41 Batches/s] --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-17-42737cee0272> in <module>() 10 question=question, 11 document...
RuntimeError
def query_by_embedding( self, query_emb: np.array, filters: Optional[Dict[str, List[str]]] = None, top_k: int = 10, index: Optional[str] = None, ) -> List[Document]: if index is None: index = self.index if not self.embedding_field: raise RuntimeError( "Please spe...
def query_by_embedding( self, query_emb: np.array, filters: Optional[Dict[str, List[str]]] = None, top_k: int = 10, index: Optional[str] = None, ) -> List[Document]: if index is None: index = self.index if not self.embedding_field: raise RuntimeError( "Please spe...
https://github.com/deepset-ai/haystack/issues/483
10/13/2020 06:43:06 - WARNING - elasticsearch - POST http://localhost:9200/faq/_search [status:400 request:0.130s] Traceback (most recent call last): File "chatbots/haystack/faqbot.py", line 214, in <module> main() File "chatbots/haystack/faqbot.py", line 186, in main faqbot.interact(question) File "chatbots/haystack...
elasticsearch.exceptions.RequestError
def _convert_es_hit_to_document( self, hit: dict, adapt_score_for_embedding: bool = False ) -> Document: # We put all additional data of the doc into meta_data and return it in the API meta_data = { k: v for k, v in hit["_source"].items() if k not in (self.text_field, self.faq_questi...
def _convert_es_hit_to_document( self, hit: dict, adapt_score_for_embedding: bool = False ) -> Document: # We put all additional data of the doc into meta_data and return it in the API meta_data = { k: v for k, v in hit["_source"].items() if k not in (self.text_field, self.faq_questi...
https://github.com/deepset-ai/haystack/issues/483
10/13/2020 06:43:06 - WARNING - elasticsearch - POST http://localhost:9200/faq/_search [status:400 request:0.130s] Traceback (most recent call last): File "chatbots/haystack/faqbot.py", line 214, in <module> main() File "chatbots/haystack/faqbot.py", line 186, in main faqbot.interact(question) File "chatbots/haystack...
elasticsearch.exceptions.RequestError
def convert_files_to_dicts( dir_path: str, clean_func: Optional[Callable] = None, split_paragraphs: bool = False ) -> List[dict]: """ Convert all files(.txt, .pdf, .docx) in the sub-directories of the given path to Python dicts that can be written to a Document Store. :param dir_path: path for the ...
def convert_files_to_dicts( dir_path: str, clean_func: Optional[Callable] = None, split_paragraphs: bool = False ) -> List[dict]: """ Convert all files(.txt, .pdf) in the sub-directories of the given path to Python dicts that can be written to a Document Store. :param dir_path: path for the documen...
https://github.com/deepset-ai/haystack/issues/453
--------------------------------------------------------------------------- Exception Traceback (most recent call last) <ipython-input-3-fd0550140fb8> in <module> 5 6 # Convert files to dicts ----> 7 dicts = convert_files_to_dicts(dir_path=doc_dir, clean_func=clean_wiki_text, split_parag...
Exception
def tika_convert_files_to_dicts( dir_path: str, clean_func: Optional[Callable] = None, split_paragraphs: bool = False, merge_short: bool = True, merge_lowercase: bool = True, ) -> List[dict]: """ Convert all files(.txt, .pdf) in the sub-directories of the given path to Python dicts that can ...
def tika_convert_files_to_dicts( dir_path: str, clean_func: Optional[Callable] = None, split_paragraphs: bool = False, merge_short: bool = True, merge_lowercase: bool = True, ) -> List[dict]: """ Convert all files(.txt, .pdf) in the sub-directories of the given path to Python dicts that can ...
https://github.com/deepset-ai/haystack/issues/453
--------------------------------------------------------------------------- Exception Traceback (most recent call last) <ipython-input-3-fd0550140fb8> in <module> 5 6 # Convert files to dicts ----> 7 dicts = convert_files_to_dicts(dir_path=doc_dir, clean_func=clean_wiki_text, split_parag...
Exception
def fetch_archive_from_http(url: str, output_dir: str, proxies: Optional[dict] = None): """ Fetch an archive (zip or tar.gz) from a url via http and extract content to an output directory. :param url: http address :type url: str :param output_dir: local path :type output_dir: str :param pro...
def fetch_archive_from_http(url: str, output_dir: str, proxies: Optional[dict] = None): """ Fetch an archive (zip or tar.gz) from a url via http and extract content to an output directory. :param url: http address :type url: str :param output_dir: local path :type output_dir: str :param pro...
https://github.com/deepset-ai/haystack/issues/453
--------------------------------------------------------------------------- Exception Traceback (most recent call last) <ipython-input-3-fd0550140fb8> in <module> 5 6 # Convert files to dicts ----> 7 dicts = convert_files_to_dicts(dir_path=doc_dir, clean_func=clean_wiki_text, split_parag...
Exception
def __init__( self, text: str, id: str = None, query_score: Optional[float] = None, question: Optional[str] = None, meta: Dict[str, Any] = None, tags: Optional[Dict[str, Any]] = None, embedding: Optional[List[float]] = None, ): """ Object used to represent documents / passages in...
def __init__( self, text: str, id: Optional[Union[str, UUID]] = None, query_score: Optional[float] = None, question: Optional[str] = None, meta: Dict[str, Any] = None, tags: Optional[Dict[str, Any]] = None, embedding: Optional[List[float]] = None, ): """ Object used to represent ...
https://github.com/deepset-ai/haystack/issues/278
07/31/2020 16:12:59 - INFO - haystack.retriever.dpr_utils - Loading saved model from models/dpr/checkpoint/retriever/single/nq/bert-base-encoder.cp 07/31/2020 16:12:59 - INFO - haystack.retriever.dense - Loaded encoder params: {'do_lower_case': True, 'pretrained_model_cfg': 'bert-base-uncased', 'encoder_model_type...
ValueError
def __init__( self, question: str, answer: str, is_correct_answer: bool, is_correct_document: bool, origin: str, document_id: Optional[str] = None, offset_start_in_doc: Optional[int] = None, no_answer: Optional[bool] = None, model_id: Optional[int] = None, ): """ Object u...
def __init__( self, question: str, answer: str, is_correct_answer: bool, is_correct_document: bool, origin: str, document_id: Optional[UUID] = None, offset_start_in_doc: Optional[int] = None, no_answer: Optional[bool] = None, model_id: Optional[int] = None, ): """ Object ...
https://github.com/deepset-ai/haystack/issues/278
07/31/2020 16:12:59 - INFO - haystack.retriever.dpr_utils - Loading saved model from models/dpr/checkpoint/retriever/single/nq/bert-base-encoder.cp 07/31/2020 16:12:59 - INFO - haystack.retriever.dense - Loaded encoder params: {'do_lower_case': True, 'pretrained_model_cfg': 'bert-base-uncased', 'encoder_model_type...
ValueError
def get_document_by_id( self, id: str, index: Optional[str] = None ) -> Optional[Document]: pass
def get_document_by_id( self, id: UUID, index: Optional[str] = None ) -> Optional[Document]: pass
https://github.com/deepset-ai/haystack/issues/278
07/31/2020 16:12:59 - INFO - haystack.retriever.dpr_utils - Loading saved model from models/dpr/checkpoint/retriever/single/nq/bert-base-encoder.cp 07/31/2020 16:12:59 - INFO - haystack.retriever.dense - Loaded encoder params: {'do_lower_case': True, 'pretrained_model_cfg': 'bert-base-uncased', 'encoder_model_type...
ValueError
def get_document_by_id(self, id: str, index=None) -> Optional[Document]: if index is None: index = self.index query = {"query": {"ids": {"values": [id]}}} result = self.client.search(index=index, body=query)["hits"]["hits"] document = self._convert_es_hit_to_document(result[0]) if result else N...
def get_document_by_id(self, id: Union[UUID, str], index=None) -> Optional[Document]: if index is None: index = self.index query = {"query": {"ids": {"values": [id]}}} result = self.client.search(index=index, body=query)["hits"]["hits"] document = self._convert_es_hit_to_document(result[0]) if ...
https://github.com/deepset-ai/haystack/issues/278
07/31/2020 16:12:59 - INFO - haystack.retriever.dpr_utils - Loading saved model from models/dpr/checkpoint/retriever/single/nq/bert-base-encoder.cp 07/31/2020 16:12:59 - INFO - haystack.retriever.dense - Loaded encoder params: {'do_lower_case': True, 'pretrained_model_cfg': 'bert-base-uncased', 'encoder_model_type...
ValueError
def write_labels( self, labels: Union[List[dict], List[Label]], index: Optional[str] = None ): index = index or self.label_index label_objects = [Label.from_dict(l) if isinstance(l, dict) else l for l in labels] for label in label_objects: label_id = str(uuid4()) self.indexes[index][lab...
def write_labels( self, labels: Union[List[dict], List[Label]], index: Optional[str] = None ): index = index or self.label_index label_objects = [Label.from_dict(l) if isinstance(l, dict) else l for l in labels] for label in label_objects: label_id = uuid.uuid4() self.indexes[index][lab...
https://github.com/deepset-ai/haystack/issues/278
07/31/2020 16:12:59 - INFO - haystack.retriever.dpr_utils - Loading saved model from models/dpr/checkpoint/retriever/single/nq/bert-base-encoder.cp 07/31/2020 16:12:59 - INFO - haystack.retriever.dense - Loaded encoder params: {'do_lower_case': True, 'pretrained_model_cfg': 'bert-base-uncased', 'encoder_model_type...
ValueError
def get_document_by_id(self, id: str, index: Optional[str] = None) -> Document: index = index or self.index return self.indexes[index][id]
def get_document_by_id( self, id: Union[str, UUID], index: Optional[str] = None ) -> Document: index = index or self.index return self.indexes[index][id]
https://github.com/deepset-ai/haystack/issues/278
07/31/2020 16:12:59 - INFO - haystack.retriever.dpr_utils - Loading saved model from models/dpr/checkpoint/retriever/single/nq/bert-base-encoder.cp 07/31/2020 16:12:59 - INFO - haystack.retriever.dense - Loaded encoder params: {'do_lower_case': True, 'pretrained_model_cfg': 'bert-base-uncased', 'encoder_model_type...
ValueError
def get_document_by_id(self, id: str, index=None) -> Optional[Document]: index = index or self.index document_row = self.session.query(DocumentORM).filter_by(index=index, id=id).first() document = document_row or self._convert_sql_row_to_document(document_row) return document
def get_document_by_id(self, id: UUID, index=None) -> Optional[Document]: index = index or self.index document_row = self.session.query(DocumentORM).filter_by(index=index, id=id).first() document = document_row or self._convert_sql_row_to_document(document_row) return document
https://github.com/deepset-ai/haystack/issues/278
07/31/2020 16:12:59 - INFO - haystack.retriever.dpr_utils - Loading saved model from models/dpr/checkpoint/retriever/single/nq/bert-base-encoder.cp 07/31/2020 16:12:59 - INFO - haystack.retriever.dense - Loaded encoder params: {'do_lower_case': True, 'pretrained_model_cfg': 'bert-base-uncased', 'encoder_model_type...
ValueError
def write_labels(self, labels, index=None): labels = [Label.from_dict(l) if isinstance(l, dict) else l for l in labels] index = index or self.index for label in labels: label_orm = LabelORM( id=str(uuid4()), document_id=label.document_id, no_answer=label.no_answer...
def write_labels(self, labels, index=None): labels = [Label.from_dict(l) if isinstance(l, dict) else l for l in labels] index = index or self.index for label in labels: label_orm = LabelORM( document_id=label.document_id, no_answer=label.no_answer, origin=label.or...
https://github.com/deepset-ai/haystack/issues/278
07/31/2020 16:12:59 - INFO - haystack.retriever.dpr_utils - Loading saved model from models/dpr/checkpoint/retriever/single/nq/bert-base-encoder.cp 07/31/2020 16:12:59 - INFO - haystack.retriever.dense - Loaded encoder params: {'do_lower_case': True, 'pretrained_model_cfg': 'bert-base-uncased', 'encoder_model_type...
ValueError
def __init__( self, document_store: Type[BaseDocumentStore], embedding_model: str, gpu: bool = True, model_format: str = "farm", pooling_strategy: str = "reduce_mean", emb_extraction_layer: int = -1, ): """ TODO :param document_store: :param embedding_model: :param gpu: ...
def __init__( self, document_store: Type[BaseDocumentStore], embedding_model: str, gpu: bool = True, model_format: str = "farm", pooling_strategy: str = "reduce_mean", emb_extraction_layer: int = -1, ): """ TODO :param document_store: :param embedding_model: :param gpu: ...
https://github.com/deepset-ai/haystack/issues/116
Traceback (most recent call last): File "/home/pedro/.local/lib/python3.8/site-packages/elasticsearch/serializer.py", line 50, in dumps return json.dumps( File "/home/pedro/.local/lib/python3.8/site-packages/simplejson/__init__.py", line 398, in dumps return cls( File "/home/pedro/.local/lib/python3.8/site-packages/sim...
TypeError
def create_embedding(self, texts: [str]): """ Create embeddings for each text in a list of texts using the retrievers model (`self.embedding_model`) :param texts: texts to embed :return: list of embeddings (one per input text). Each embedding is a list of floats. """ # for backward compatibilit...
def create_embedding(self, texts: [str]): """ Create embeddings for each text in a list of texts using the retrievers model (`self.embedding_model`) :param texts: texts to embed :return: list of embeddings (one per input text). Each embedding is a list of floats. """ # for backward compatibilit...
https://github.com/deepset-ai/haystack/issues/116
Traceback (most recent call last): File "/home/pedro/.local/lib/python3.8/site-packages/elasticsearch/serializer.py", line 50, in dumps return json.dumps( File "/home/pedro/.local/lib/python3.8/site-packages/simplejson/__init__.py", line 398, in dumps return cls( File "/home/pedro/.local/lib/python3.8/site-packages/sim...
TypeError
def install_environment( prefix: Prefix, version: str, additional_dependencies: Sequence[str], ) -> None: helpers.assert_version_default("golang", version) directory = prefix.path( helpers.environment_dir(ENVIRONMENT_DIR, C.DEFAULT), ) with clean_path_on_failure(directory): ...
def install_environment( prefix: Prefix, version: str, additional_dependencies: Sequence[str], ) -> None: helpers.assert_version_default("golang", version) directory = prefix.path( helpers.environment_dir(ENVIRONMENT_DIR, C.DEFAULT), ) with clean_path_on_failure(directory): ...
https://github.com/pre-commit/pre-commit/issues/1788
Traceback (most recent call last): File "/usr/local/Cellar/pre-commit/2.10.0/libexec/lib/python3.9/site-packages/pre_commit/error_handler.py", line 65, in error_handler yield File "/usr/local/Cellar/pre-commit/2.10.0/libexec/lib/python3.9/site-packages/pre_commit/main.py", line 378, in main return run(args.config, stor...
pre_commit.util.CalledProcessError
def get_root() -> str: # Git 2.25 introduced a change to "rev-parse --show-toplevel" that exposed # underlying volumes for Windows drives mapped with SUBST. We use # "rev-parse --show-cdup" to get the appropriate path, but must perform # an extra check to see if we are in the .git directory. try: ...
def get_root() -> str: # Git 2.25 introduced a change to "rev-parse --show-toplevel" that exposed # underlying volumes for Windows drives mapped with SUBST. We use # "rev-parse --show-cdup" to get the appropriate path, but must perform # an extra check to see if we are in the .git directory. try: ...
https://github.com/pre-commit/pre-commit/issues/1777
Traceback (most recent call last): File "/home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/lib/python3.6/site-packages/pre_commit/error_handler.py", line 65, in error_handler yield File "/home/vampas/.dotfiles/.ext/pyenv/versions/3.6.8/envs/SaltPriv-3.6/lib/python3.6/site-packages/pre_commit/main.py", ...
pre_commit.errors.FatalError
def get_env_patch( venv: str, language_version: str, ) -> PatchesT: patches: PatchesT = ( ("GEM_HOME", os.path.join(venv, "gems")), ("GEM_PATH", UNSET), ("BUNDLE_IGNORE_CONFIG", "1"), ) if language_version == "system": patches += ( ( "PATH"...
def get_env_patch( venv: str, language_version: str, ) -> PatchesT: patches: PatchesT = ( ("GEM_HOME", os.path.join(venv, "gems")), ("GEM_PATH", UNSET), ("BUNDLE_IGNORE_CONFIG", "1"), ) if language_version == "system": patches += ( ( "PATH"...
https://github.com/pre-commit/pre-commit/issues/1699
### version information ``` pre-commit version: 2.8.2 sys.version: 3.8.2 (default, Jul 7 2020, 11:55:37) [Clang 11.0.3 (clang-1103.0.32.62)] sys.executable: /Users/abuxton/.pyenv/versions/3.8.2/bin/python3.8 os.name: posix sys.platform: darwin ``` ### error information ``` An unexpected error has occurred:...
pre_commit.util.CalledProcessError
def get_default_version() -> str: # nodeenv does not yet support `-n system` on windows if sys.platform == "win32": return C.DEFAULT # if node is already installed, we can save a bunch of setup time by # using the installed version elif all(helpers.exe_exists(exe) for exe in ("node", "npm"))...
def get_default_version() -> str: # nodeenv does not yet support `-n system` on windows if sys.platform == "win32": return C.DEFAULT # if node is already installed, we can save a bunch of setup time by # using the installed version elif all(parse_shebang.find_executable(exe) for exe in ("nod...
https://github.com/pre-commit/pre-commit/issues/1658
Traceback (most recent call last): File "/usr/local/Cellar/pre-commit/2.7.1_1/libexec/lib/python3.9/site-packages/pre_commit/error_handler.py", line 63, in error_handler yield File "/usr/local/Cellar/pre-commit/2.7.1_1/libexec/lib/python3.9/site-packages/pre_commit/main.py", line 390, in main return run(args.config, st...
FileNotFoundError
def get_default_version() -> str: if all(helpers.exe_exists(exe) for exe in ("ruby", "gem")): return "system" else: return C.DEFAULT
def get_default_version() -> str: if all(parse_shebang.find_executable(exe) for exe in ("ruby", "gem")): return "system" else: return C.DEFAULT
https://github.com/pre-commit/pre-commit/issues/1658
Traceback (most recent call last): File "/usr/local/Cellar/pre-commit/2.7.1_1/libexec/lib/python3.9/site-packages/pre_commit/error_handler.py", line 63, in error_handler yield File "/usr/local/Cellar/pre-commit/2.7.1_1/libexec/lib/python3.9/site-packages/pre_commit/main.py", line 390, in main return run(args.config, st...
FileNotFoundError
def _find_by_py_launcher( version: str, ) -> Optional[str]: # pragma: no cover (windows only) if version.startswith("python"): num = version[len("python") :] cmd = ("py", f"-{num}", "-c", "import sys; print(sys.executable)") env = dict(os.environ, PYTHONIOENCODING="UTF-8") try: ...
def _find_by_py_launcher( version: str, ) -> Optional[str]: # pragma: no cover (windows only) if version.startswith("python"): num = version[len("python") :] try: cmd = ("py", f"-{num}", "-c", "import sys; print(sys.executable)") return cmd_output(*cmd)[1].strip() ...
https://github.com/pre-commit/pre-commit/issues/1472
Traceback (most recent call last): File "c:\program files\git\dev\core\venv\lib\site-packages\pre_commit\error_handler.py", line 56, in error_handler yield File "c:\program files\git\dev\core\venv\lib\site-packages\pre_commit\main.py", line 372, in main args=args.rest[1:], File "c:\program files\git\dev\core\venv\lib\s...
UnicodeDecodeError
def migrate_config(config_file: str, quiet: bool = False) -> int: # ensure that the configuration is a valid pre-commit configuration load_config(config_file) with open(config_file) as f: orig_contents = contents = f.read() contents = _migrate_map(contents) contents = _migrate_sha_to_rev(c...
def migrate_config(config_file: str, quiet: bool = False) -> int: with open(config_file) as f: orig_contents = contents = f.read() contents = _migrate_map(contents) contents = _migrate_sha_to_rev(contents) if contents != orig_contents: with open(config_file, "w") as f: f.wr...
https://github.com/pre-commit/pre-commit/issues/1447
Traceback (most recent call last): File "/home/ryan/.local/pipx/venvs/pre-commit/lib/python3.8/site-packages/pre_commit/error_handler.py", line 56, in error_handler yield File "/home/ryan/.local/pipx/venvs/pre-commit/lib/python3.8/site-packages/pre_commit/main.py", line 354, in main return autoupdate( File "/home/ryan/...
yaml.scanner.ScannerError
def py_interface( _dir: str, _make_venv: Callable[[str, str], None], ) -> Tuple[ Callable[[Prefix, str], ContextManager[None]], Callable[[Prefix, str], bool], Callable[[Hook, Sequence[str], bool], Tuple[int, bytes]], Callable[[Prefix, str, Sequence[str]], None], ]: @contextlib.contextmanager...
def py_interface( _dir: str, _make_venv: Callable[[str, str], None], ) -> Tuple[ Callable[[Prefix, str], ContextManager[None]], Callable[[Prefix, str], bool], Callable[[Hook, Sequence[str], bool], Tuple[int, bytes]], Callable[[Prefix, str, Sequence[str]], None], ]: @contextlib.contextmanager...
https://github.com/pre-commit/pre-commit/issues/1398
Traceback (most recent call last): File "c:\program files\python37\lib\site-packages\pre_commit\error_handler.py", line 56, in error_handler yield File "c:\program files\python37\lib\site-packages\pre_commit\main.py", line 372, in main args=args.rest[1:], File "c:\program files\python37\lib\site-packages\pre_commit\com...
pre_commit.util.CalledProcessError
def install_environment( prefix: Prefix, version: str, additional_dependencies: Sequence[str], ) -> None: directory = helpers.environment_dir(_dir, version) install = ("python", "-mpip", "install", ".", *additional_dependencies) env_dir = prefix.path(directory) with clean_path_on_failure(en...
def install_environment( prefix: Prefix, version: str, additional_dependencies: Sequence[str], ) -> None: additional_dependencies = tuple(additional_dependencies) directory = helpers.environment_dir(_dir, version) env_dir = prefix.path(directory) with clean_path_on_failure(env_dir): ...
https://github.com/pre-commit/pre-commit/issues/1398
Traceback (most recent call last): File "c:\program files\python37\lib\site-packages\pre_commit\error_handler.py", line 56, in error_handler yield File "c:\program files\python37\lib\site-packages\pre_commit\main.py", line 372, in main args=args.rest[1:], File "c:\program files\python37\lib\site-packages\pre_commit\com...
pre_commit.util.CalledProcessError
def _log_and_exit(msg: str, exc: BaseException, formatted: str) -> None: error_msg = f"{msg}: {type(exc).__name__}: ".encode() + force_bytes(exc) output.write_line_b(error_msg) log_path = os.path.join(Store().directory, "pre-commit.log") output.write_line(f"Check the log at {log_path}") with open(l...
def _log_and_exit(msg: str, exc: BaseException, formatted: str) -> None: error_msg = f"{msg}: {type(exc).__name__}: ".encode() error_msg += _exception_to_bytes(exc) output.write_line_b(error_msg) log_path = os.path.join(Store().directory, "pre-commit.log") output.write_line(f"Check the log at {log_p...
https://github.com/pre-commit/pre-commit/issues/1350
Traceback (most recent call last): File "/[redacted]/venv/lib/python3.7/site-packages/pre_commit/error_handler.py", line 54, in error_handler yield File "/[redacted]/venv/lib/python3.7/site-packages/pre_commit/main.py", line 371, in main return run(args.config, store, args) File "/[redacted]/venv/lib/python3.7/site-pac...
OSError
def cmd_output_b( *cmd: str, retcode: Optional[int] = 0, **kwargs: Any, ) -> Tuple[int, bytes, Optional[bytes]]: _setdefault_kwargs(kwargs) try: cmd = parse_shebang.normalize_cmd(cmd) except parse_shebang.ExecutableNotFoundError as e: returncode, stdout_b, stderr_b = e.to_output...
def cmd_output_b( *cmd: str, retcode: Optional[int] = 0, **kwargs: Any, ) -> Tuple[int, bytes, Optional[bytes]]: _setdefault_kwargs(kwargs) try: cmd = parse_shebang.normalize_cmd(cmd) except parse_shebang.ExecutableNotFoundError as e: returncode, stdout_b, stderr_b = e.to_output...
https://github.com/pre-commit/pre-commit/issues/1350
Traceback (most recent call last): File "/[redacted]/venv/lib/python3.7/site-packages/pre_commit/error_handler.py", line 54, in error_handler yield File "/[redacted]/venv/lib/python3.7/site-packages/pre_commit/main.py", line 371, in main return run(args.config, store, args) File "/[redacted]/venv/lib/python3.7/site-pac...
OSError
def cmd_output_p( *cmd: str, retcode: Optional[int] = 0, **kwargs: Any, ) -> Tuple[int, bytes, Optional[bytes]]: assert retcode is None assert kwargs["stderr"] == subprocess.STDOUT, kwargs["stderr"] _setdefault_kwargs(kwargs) try: cmd = parse_shebang.normalize_cmd(cmd) except pa...
def cmd_output_p( *cmd: str, retcode: Optional[int] = 0, **kwargs: Any, ) -> Tuple[int, bytes, Optional[bytes]]: assert retcode is None assert kwargs["stderr"] == subprocess.STDOUT, kwargs["stderr"] _setdefault_kwargs(kwargs) try: cmd = parse_shebang.normalize_cmd(cmd) except pa...
https://github.com/pre-commit/pre-commit/issues/1350
Traceback (most recent call last): File "/[redacted]/venv/lib/python3.7/site-packages/pre_commit/error_handler.py", line 54, in error_handler yield File "/[redacted]/venv/lib/python3.7/site-packages/pre_commit/main.py", line 371, in main return run(args.config, store, args) File "/[redacted]/venv/lib/python3.7/site-pac...
OSError
def no_git_env(_env=None): # Too many bugs dealing with environment variables and GIT: # https://github.com/pre-commit/pre-commit/issues/300 # In git 2.6.3 (maybe others), git exports GIT_WORK_TREE while running # pre-commit hooks # In git 1.9.1 (maybe others), git exports GIT_DIR and GIT_INDEX_FILE...
def no_git_env(_env=None): # Too many bugs dealing with environment variables and GIT: # https://github.com/pre-commit/pre-commit/issues/300 # In git 2.6.3 (maybe others), git exports GIT_WORK_TREE while running # pre-commit hooks # In git 1.9.1 (maybe others), git exports GIT_DIR and GIT_INDEX_FILE...
https://github.com/pre-commit/pre-commit/issues/1253
An unexpected error has occurred: CalledProcessError: Command: ('/home/igankevich/.guix-profile/bin/git', 'fetch', 'origin', '--tags') Return code: 128 Expected return code: 0 Output: (none) Errors: fatal: unable to access 'https://github.com/pre-commit/pre-commit-hooks/': server certificate verification failed. CAfile...
pre_commit.util.CalledProcessError
def rmtree(path): """On windows, rmtree fails for readonly dirs.""" def handle_remove_readonly(func, path, exc): excvalue = exc[1] if func in (os.rmdir, os.remove, os.unlink) and excvalue.errno == errno.EACCES: for p in (path, os.path.dirname(path)): os.chmod(p, os.s...
def rmtree(path): """On windows, rmtree fails for readonly dirs.""" def handle_remove_readonly(func, path, exc): # pragma: no cover (windows) excvalue = exc[1] if func in (os.rmdir, os.remove, os.unlink) and excvalue.errno == errno.EACCES: os.chmod(path, stat.S_IRWXU | stat.S_IRWXG...
https://github.com/pre-commit/pre-commit/issues/1042
An unexpected error has occurred: PermissionError: [Errno 13] Permission denied: '/Users/detailyang/.cache/pre-commit/repo2ba1f3b5/golangenv-default/pkg/mod/github.com/!burnt!sushi/toml@v0.3.1/.gitignore' Traceback (most recent call last): File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/li...
PermissionError
def handle_remove_readonly(func, path, exc): excvalue = exc[1] if func in (os.rmdir, os.remove, os.unlink) and excvalue.errno == errno.EACCES: for p in (path, os.path.dirname(path)): os.chmod(p, os.stat(p).st_mode | stat.S_IWUSR) func(path) else: raise
def handle_remove_readonly(func, path, exc): # pragma: no cover (windows) excvalue = exc[1] if func in (os.rmdir, os.remove, os.unlink) and excvalue.errno == errno.EACCES: os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO) func(path) else: raise
https://github.com/pre-commit/pre-commit/issues/1042
An unexpected error has occurred: PermissionError: [Errno 13] Permission denied: '/Users/detailyang/.cache/pre-commit/repo2ba1f3b5/golangenv-default/pkg/mod/github.com/!burnt!sushi/toml@v0.3.1/.gitignore' Traceback (most recent call last): File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/li...
PermissionError
def py_interface(_dir, _make_venv): @contextlib.contextmanager def in_env(prefix, language_version): envdir = prefix.path(helpers.environment_dir(_dir, language_version)) with envcontext(get_env_patch(envdir)): yield def healthy(prefix, language_version): with in_env(pre...
def py_interface(_dir, _make_venv): @contextlib.contextmanager def in_env(prefix, language_version): envdir = prefix.path(helpers.environment_dir(_dir, language_version)) with envcontext(get_env_patch(envdir)): yield def healthy(prefix, language_version): with in_env(pre...
https://github.com/pre-commit/pre-commit/issues/1021
An unexpected error has occurred: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe3 in position 282: invalid continuation byte Traceback (most recent call last): File "c:\pytest\.tox\linting\lib\site-packages\pre_commit\error_handler.py", line 46, in error_handler yield File "c:\pytest\.tox\linting\lib\site-pack...
UnicodeDecodeError
def healthy(prefix, language_version): with in_env(prefix, language_version): retcode, _, _ = cmd_output( "python", "-c", "import ctypes, datetime, io, os, ssl, weakref", retcode=None, encoding=None, ) return retcode == 0
def healthy(prefix, language_version): with in_env(prefix, language_version): retcode, _, _ = cmd_output( "python", "-c", "import ctypes, datetime, io, os, ssl, weakref", retcode=None, ) return retcode == 0
https://github.com/pre-commit/pre-commit/issues/1021
An unexpected error has occurred: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe3 in position 282: invalid continuation byte Traceback (most recent call last): File "c:\pytest\.tox\linting\lib\site-packages\pre_commit\error_handler.py", line 46, in error_handler yield File "c:\pytest\.tox\linting\lib\site-pack...
UnicodeDecodeError
def _repo_ref(tmpdir, repo, ref): # if `ref` is explicitly passed, use it if ref: return repo, ref ref = git.head_rev(repo) # if it exists on disk, we'll try and clone it with the local changes if os.path.exists(repo) and git.has_diff("HEAD", repo=repo): logger.warning("Creating tem...
def _repo_ref(tmpdir, repo, ref): # if `ref` is explicitly passed, use it if ref: return repo, ref ref = git.head_rev(repo) # if it exists on disk, we'll try and clone it with the local changes if os.path.exists(repo) and git.has_diff("HEAD", repo=repo): logger.warning("Creating tem...
https://github.com/pre-commit/pre-commit/issues/953
$ cat /home/asottile/.cache/pre-commit/pre-commit.log An unexpected error has occurred: CalledProcessError: Command: ('/usr/bin/git', 'commit', '--no-edit', '--no-gpg-sign', '-n', '-minit') Return code: 1 Expected return code: 0 Output: On branch _pc_tmp nothing to commit, working tree clean Errors: (none) Traceback ...
pre_commit.util.CalledProcessError
def get_staged_files(cwd=None): return zsplit( cmd_output( "git", "diff", "--staged", "--name-only", "--no-ext-diff", "-z", # Everything except for D "--diff-filter=ACMRTUXB", cwd=cwd, )[1] ...
def get_staged_files(): return zsplit( cmd_output( "git", "diff", "--staged", "--name-only", "--no-ext-diff", "-z", # Everything except for D "--diff-filter=ACMRTUXB", )[1] )
https://github.com/pre-commit/pre-commit/issues/953
$ cat /home/asottile/.cache/pre-commit/pre-commit.log An unexpected error has occurred: CalledProcessError: Command: ('/usr/bin/git', 'commit', '--no-edit', '--no-gpg-sign', '-n', '-minit') Return code: 1 Expected return code: 0 Output: On branch _pc_tmp nothing to commit, working tree clean Errors: (none) Traceback ...
pre_commit.util.CalledProcessError
def xargs(cmd, varargs, **kwargs): """A simplified implementation of xargs. negate: Make nonzero successful and zero a failure target_concurrency: Target number of partitions to run concurrently """ negate = kwargs.pop("negate", False) target_concurrency = kwargs.pop("target_concurrency", 1) ...
def xargs(cmd, varargs, **kwargs): """A simplified implementation of xargs. negate: Make nonzero successful and zero a failure target_concurrency: Target number of partitions to run concurrently """ negate = kwargs.pop("negate", False) target_concurrency = kwargs.pop("target_concurrency", 1) ...
https://github.com/pre-commit/pre-commit/issues/953
$ cat /home/asottile/.cache/pre-commit/pre-commit.log An unexpected error has occurred: CalledProcessError: Command: ('/usr/bin/git', 'commit', '--no-edit', '--no-gpg-sign', '-n', '-minit') Return code: 1 Expected return code: 0 Output: On branch _pc_tmp nothing to commit, working tree clean Errors: (none) Traceback ...
pre_commit.util.CalledProcessError
def run_cmd_partition(run_cmd): return cmd_output(*run_cmd, encoding=None, retcode=None, **kwargs)
def run_cmd_partition(run_cmd): return cmd_output(*run_cmd, encoding=None, retcode=None)
https://github.com/pre-commit/pre-commit/issues/953
$ cat /home/asottile/.cache/pre-commit/pre-commit.log An unexpected error has occurred: CalledProcessError: Command: ('/usr/bin/git', 'commit', '--no-edit', '--no-gpg-sign', '-n', '-minit') Return code: 1 Expected return code: 0 Output: On branch _pc_tmp nothing to commit, working tree clean Errors: (none) Traceback ...
pre_commit.util.CalledProcessError
def normexe(orig): def _error(msg): raise ExecutableNotFoundError("Executable `{}` {}".format(orig, msg)) if os.sep not in orig and (not os.altsep or os.altsep not in orig): exe = find_executable(orig) if exe is None: _error("not found") return exe elif not os.ac...
def normexe(orig_exe): if os.sep not in orig_exe: exe = find_executable(orig_exe) if exe is None: raise ExecutableNotFoundError( "Executable `{}` not found".format(orig_exe), ) return exe else: return orig_exe
https://github.com/pre-commit/pre-commit/issues/782
Bashate..................................................................An unexpected error has occurred: OSError: [Errno 2] No such file or directory Check the log at /Users/ssbarnea/.cache/pre-commit/pre-commit.log An unexpected error has occurred: OSError: [Errno 2] No such file or directory Traceback (most recent...
OSError
def make_local(self, deps): def make_local_strategy(directory): copy_tree_to_path(resource_filename("empty_template"), directory) env = no_git_env() name, email = "pre-commit", "asottile+pre-commit@umich.edu" env["GIT_AUTHOR_NAME"] = env["GIT_COMMITTER_NAME"] = name env["GIT...
def make_local(self, deps): def make_local_strategy(directory): copy_tree_to_path(resource_filename("empty_template"), directory) return self._new_repo( "local:{}".format(",".join(sorted(deps))), C.LOCAL_REPO_VERSION, make_local_strategy, )
https://github.com/pre-commit/pre-commit/issues/679
An unexpected error has occurred: CalledProcessError: Command: ('/usr/bin/git', 'config', 'remote.origin.url') Return code: 1 Expected return code: 0 Output: (none) Errors: (none) Traceback (most recent call last): File "/tmp/wat/venv/local/lib/python2.7/site-packages/pre_commit/error_handler.py", line 47, in error_ha...
CalledProcessError
def make_local_strategy(directory): copy_tree_to_path(resource_filename("empty_template"), directory) env = no_git_env() name, email = "pre-commit", "asottile+pre-commit@umich.edu" env["GIT_AUTHOR_NAME"] = env["GIT_COMMITTER_NAME"] = name env["GIT_AUTHOR_EMAIL"] = env["GIT_COMMITTER_EMAIL"] = email...
def make_local_strategy(directory): copy_tree_to_path(resource_filename("empty_template"), directory)
https://github.com/pre-commit/pre-commit/issues/679
An unexpected error has occurred: CalledProcessError: Command: ('/usr/bin/git', 'config', 'remote.origin.url') Return code: 1 Expected return code: 0 Output: (none) Errors: (none) Traceback (most recent call last): File "/tmp/wat/venv/local/lib/python2.7/site-packages/pre_commit/error_handler.py", line 47, in error_ha...
CalledProcessError
def staged_files_only(patch_dir): """Clear any unstaged changes from the git working directory inside this context. """ # Determine if there are unstaged files tree = cmd_output("git", "write-tree")[1].strip() retcode, diff_stdout_binary, _ = cmd_output( "git", "diff-index", ...
def staged_files_only(patch_dir): """Clear any unstaged changes from the git working directory inside this context. """ # Determine if there are unstaged files tree = cmd_output("git", "write-tree")[1].strip() retcode, diff_stdout_binary, _ = cmd_output( "git", "diff-index", ...
https://github.com/pre-commit/pre-commit/issues/621
Traceback (most recent call last): File "/home/asottile/workspace/pre-commit/pre_commit/error_handler.py", line 44, in error_handler yield File "/home/asottile/workspace/pre-commit/pre_commit/main.py", line 231, in main return run(runner, args) File "/home/asottile/workspace/pre-commit/pre_commit/commands/run.py", line...
IOError
def staged_files_only(cmd_runner): """Clear any unstaged changes from the git working directory inside this context. Args: cmd_runner - PrefixedCommandRunner """ # Determine if there are unstaged files tree = cmd_runner.run(("git", "write-tree"))[1].strip() retcode, diff_stdout_bina...
def staged_files_only(cmd_runner): """Clear any unstaged changes from the git working directory inside this context. Args: cmd_runner - PrefixedCommandRunner """ # Determine if there are unstaged files tree = cmd_runner.run(("git", "write-tree"))[1].strip() retcode, diff_stdout_bina...
https://github.com/pre-commit/pre-commit/issues/570
An unexpected error has occurred: CalledProcessError: Command: ('C:\\Program Files\\Git\\mingw64\\libexec\\git-core\\git.exe', 'apply', 'C:\\Users\\56929\\.pre-commit\\patch1501483011') Return code: 1 Expected return code: 0 Output: (none) Errors: error: patch failed: svnchecker_stylelint_support/checks/Stylelint.py:20...
CalledProcessError
def _run_single_hook(hook, repo, args, skips, cols): filenames = get_filenames(args, hook.get("files", ""), hook["exclude"]) if hook["id"] in skips: output.write( get_hook_message( _hook_msg_start(hook, args.verbose), end_msg=SKIPPED, end_color...
def _run_single_hook(hook, repo, args, skips, cols): filenames = get_filenames(args, hook["files"], hook["exclude"]) if hook["id"] in skips: output.write( get_hook_message( _hook_msg_start(hook, args.verbose), end_msg=SKIPPED, end_color=color.Y...
https://github.com/pre-commit/pre-commit/issues/533
$ cat ~/.pre-commit/pre-commit.log An unexpected error has occurred: KeyError: u'files' Traceback (most recent call last): File "/tmp/foo/pre-commit/pre_commit/error_handler.py", line 48, in error_handler yield File "/tmp/foo/pre-commit/pre_commit/main.py", line 226, in main return run(runner, args) File "/tmp/foo/pre-...
KeyError
def _run_single_hook(hook, repo, args, skips, cols): filenames = get_filenames(args, hook.get("files", "^$"), hook["exclude"]) if hook["id"] in skips: output.write( get_hook_message( _hook_msg_start(hook, args.verbose), end_msg=SKIPPED, end_col...
def _run_single_hook(hook, repo, args, skips, cols): filenames = get_filenames(args, hook.get("files", ""), hook["exclude"]) if hook["id"] in skips: output.write( get_hook_message( _hook_msg_start(hook, args.verbose), end_msg=SKIPPED, end_color...
https://github.com/pre-commit/pre-commit/issues/533
$ cat ~/.pre-commit/pre-commit.log An unexpected error has occurred: KeyError: u'files' Traceback (most recent call last): File "/tmp/foo/pre-commit/pre_commit/error_handler.py", line 48, in error_handler yield File "/tmp/foo/pre-commit/pre_commit/main.py", line 226, in main return run(runner, args) File "/tmp/foo/pre-...
KeyError
def install_environment( repo_cmd_runner, version="default", additional_dependencies=(), ): additional_dependencies = tuple(additional_dependencies) directory = helpers.environment_dir(ENVIRONMENT_DIR, version) # Install a virtualenv with clean_path_on_failure(repo_cmd_runner.path(directory...
def install_environment( repo_cmd_runner, version="default", additional_dependencies=(), ): additional_dependencies = tuple(additional_dependencies) directory = helpers.environment_dir(ENVIRONMENT_DIR, version) # Install a virtualenv with clean_path_on_failure(repo_cmd_runner.path(directory...
https://github.com/pre-commit/pre-commit/issues/419
An unexpected error has occurred: CalledProcessError: Command: ('/Users/amcgregor/Projects/marrow/.venv/bin/python3', '-m', 'virtualenv', '/Users/amcgregor/.pre-commit/repofu57ylaa/py_env-default') Return code: 100 Expected return code: 0 Output: Using base prefix '/usr/local/bin/../../../Library/Frameworks/Python.fram...
pre_commit.util.CalledProcessError
def run(self, cmd, **kwargs): self._create_path_if_not_exists() replaced_cmd = [part.replace("{prefix}", self.prefix_dir) for part in cmd] return cmd_output(*replaced_cmd, __popen=self.__popen, **kwargs)
def run(self, cmd, **kwargs): self._create_path_if_not_exists() replaced_cmd = _replace_cmd(cmd, prefix=self.prefix_dir) return cmd_output(*replaced_cmd, __popen=self.__popen, **kwargs)
https://github.com/pre-commit/pre-commit/issues/314
An unexpected error has occurred: IndexError: tuple index out of range Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/pre_commit/error_handler.py", line 36, in error_handler yield File "/usr/local/lib/python2.7/site-packages/pre_commit/main.py", line 150, in main return run(runner, args...
IndexError
def _run_single_hook(hook, repo, args, write, skips=frozenset()): filenames = get_filenames(args, hook["files"], hook["exclude"]) if hook["id"] in skips: _print_user_skipped(hook, write, args) return 0 elif not filenames: _print_no_files_skipped(hook, write, args) return 0 ...
def _run_single_hook(hook, repo, args, write, skips=frozenset()): filenames = get_filenames(args, hook["files"], hook["exclude"]) if hook["id"] in skips: _print_user_skipped(hook, write, args) return 0 elif not filenames: _print_no_files_skipped(hook, write, args) return 0 ...
https://github.com/pre-commit/pre-commit/issues/245
An unexpected error has occurred: UnicodeDecodeError: 'utf8' codec can't decode byte 0xbb in position 23: invalid start byte Traceback (most recent call last): File "/home/lucas/.local/lib/python2.7/site-packages/pre_commit/error_handler.py", line 34, in error_handler yield File "/home/lucas/.local/lib/python2.7/site-p...
UnicodeDecodeError
def run_hook(env, hook, file_args): quoted_args = [pipes.quote(arg) for arg in hook["args"]] return env.run( # Use -s 4000 (slightly less than posix mandated minimum) # This is to prevent "xargs: ... Bad file number" on windows " ".join(["xargs", "-0", "-s4000", hook["entry"]] + quoted_a...
def run_hook(env, hook, file_args): quoted_args = [pipes.quote(arg) for arg in hook["args"]] return env.run( # Use -s 4000 (slightly less than posix mandated minimum) # This is to prevent "xargs: ... Bad file number" on windows " ".join(["xargs", "-0", "-s4000", hook["entry"]] + quoted_a...
https://github.com/pre-commit/pre-commit/issues/245
An unexpected error has occurred: UnicodeDecodeError: 'utf8' codec can't decode byte 0xbb in position 23: invalid start byte Traceback (most recent call last): File "/home/lucas/.local/lib/python2.7/site-packages/pre_commit/error_handler.py", line 34, in error_handler yield File "/home/lucas/.local/lib/python2.7/site-p...
UnicodeDecodeError
def run_hook(repo_cmd_runner, hook, file_args): # For PCRE the entry is the regular expression to match return repo_cmd_runner.run( [ "xargs", "-0", "sh", "-c", # Grep usually returns 0 for matches, and nonzero for non-matches # so ...
def run_hook(repo_cmd_runner, hook, file_args): # For PCRE the entry is the regular expression to match return repo_cmd_runner.run( [ "xargs", "-0", "sh", "-c", # Grep usually returns 0 for matches, and nonzero for non-matches # so ...
https://github.com/pre-commit/pre-commit/issues/245
An unexpected error has occurred: UnicodeDecodeError: 'utf8' codec can't decode byte 0xbb in position 23: invalid start byte Traceback (most recent call last): File "/home/lucas/.local/lib/python2.7/site-packages/pre_commit/error_handler.py", line 34, in error_handler yield File "/home/lucas/.local/lib/python2.7/site-p...
UnicodeDecodeError
def run_hook(repo_cmd_runner, hook, file_args): return repo_cmd_runner.run( ["xargs", "-0", "{{prefix}}{0}".format(hook["entry"])] + hook["args"], # TODO: this is duplicated in pre_commit/languages/helpers.py stdin=file_args_to_stdin(file_args), retcode=None, encoding=None, ...
def run_hook(repo_cmd_runner, hook, file_args): return repo_cmd_runner.run( ["xargs", "-0", "{{prefix}}{0}".format(hook["entry"])] + hook["args"], # TODO: this is duplicated in pre_commit/languages/helpers.py stdin=file_args_to_stdin(file_args), retcode=None, )
https://github.com/pre-commit/pre-commit/issues/245
An unexpected error has occurred: UnicodeDecodeError: 'utf8' codec can't decode byte 0xbb in position 23: invalid start byte Traceback (most recent call last): File "/home/lucas/.local/lib/python2.7/site-packages/pre_commit/error_handler.py", line 34, in error_handler yield File "/home/lucas/.local/lib/python2.7/site-p...
UnicodeDecodeError
def run_hook(repo_cmd_runner, hook, file_args): return repo_cmd_runner.run( ["xargs", "-0"] + shlex.split(hook["entry"]) + hook["args"], stdin=file_args_to_stdin(file_args), retcode=None, encoding=None, )
def run_hook(repo_cmd_runner, hook, file_args): return repo_cmd_runner.run( ["xargs", "-0"] + shlex.split(hook["entry"]) + hook["args"], stdin=file_args_to_stdin(file_args), retcode=None, )
https://github.com/pre-commit/pre-commit/issues/245
An unexpected error has occurred: UnicodeDecodeError: 'utf8' codec can't decode byte 0xbb in position 23: invalid start byte Traceback (most recent call last): File "/home/lucas/.local/lib/python2.7/site-packages/pre_commit/error_handler.py", line 34, in error_handler yield File "/home/lucas/.local/lib/python2.7/site-p...
UnicodeDecodeError
def autoupdate(runner): """Auto-update the pre-commit config to the latest versions of repos.""" retv = 0 output_configs = [] changed = False input_configs = load_config( runner.config_file_path, load_strategy=ordered_load, ) for repo_config in input_configs: if is_...
def autoupdate(runner): """Auto-update the pre-commit config to the latest versions of repos.""" retv = 0 output_configs = [] changed = False input_configs = load_config( runner.config_file_path, load_strategy=ordered_load, ) for repo_config in input_configs: sys.st...
https://github.com/pre-commit/pre-commit/issues/238
$ pre-commit autoupdate Updating git@github.com:pre-commit/pre-commit-hooks...updating 9ce45609a92f648c87b42207410386fd69a5d1e5 -> cf550fcab3f12015f8676b8278b30e1a5bc10e70. Updating git@github.com:pre-commit/pre-commit...updating 4352d45451296934bc17494073b82bcacca3205c -> 1c46446427ab0dfa6293221426b855420533ef8d. Upda...
AttributeError
def __init__(self, repo_config): super(LocalRepository, self).__init__(repo_config, None)
def __init__(self, repo_config, repo_path_getter=None): repo_path_getter = None super(LocalRepository, self).__init__(repo_config, repo_path_getter)
https://github.com/pre-commit/pre-commit/issues/238
$ pre-commit autoupdate Updating git@github.com:pre-commit/pre-commit-hooks...updating 9ce45609a92f648c87b42207410386fd69a5d1e5 -> cf550fcab3f12015f8676b8278b30e1a5bc10e70. Updating git@github.com:pre-commit/pre-commit...updating 4352d45451296934bc17494073b82bcacca3205c -> 1c46446427ab0dfa6293221426b855420533ef8d. Upda...
AttributeError
def main(argv=None): argv = argv if argv is not None else sys.argv[1:] argv = [five.to_text(arg) for arg in argv] parser = argparse.ArgumentParser() # http://stackoverflow.com/a/8521644/812183 parser.add_argument( "-V", "--version", action="version", version="%(prog)...
def main(argv=None): argv = argv if argv is not None else sys.argv[1:] parser = argparse.ArgumentParser() # http://stackoverflow.com/a/8521644/812183 parser.add_argument( "-V", "--version", action="version", version="%(prog)s {0}".format( pkg_resources.get_di...
https://github.com/pre-commit/pre-commit/issues/207
$ pre-commit run ☃ An unexpected error has occurred: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128) Check the log at ~/.pre-commit/pre-commit.log $ cat ~/.pre-commit/pre-commit.log An unexpected error has occurred: UnicodeDecodeError: 'ascii' codec can't decode byte 0x...
UnicodeDecodeError
def sys_stdout_write_wrapper(s, stream=stdout_byte_stream): stream.write(five.to_bytes(s))
def sys_stdout_write_wrapper(s, stream=sys.stdout): """Python 2.6 chokes on unicode being passed to sys.stdout.write. This is an adapter because PY2 is ok with bytes and PY3 requires text. """ assert type(s) is five.text if five.PY2: # pragma: no cover (PY2) s = s.encode("UTF-8") strea...
https://github.com/pre-commit/pre-commit/issues/207
$ pre-commit run ☃ An unexpected error has occurred: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128) Check the log at ~/.pre-commit/pre-commit.log $ cat ~/.pre-commit/pre-commit.log An unexpected error has occurred: UnicodeDecodeError: 'ascii' codec can't decode byte 0x...
UnicodeDecodeError
def run(runner, args, write=sys_stdout_write_wrapper, environ=os.environ): # Set up our logging handler logger.addHandler(LoggingHandler(args.color, write=write)) logger.setLevel(logging.INFO) # Check if we have unresolved merge conflict files and fail fast. if _has_unmerged_paths(runner): ...
def run(runner, args, write=sys.stdout.write, environ=os.environ): # Set up our logging handler logger.addHandler(LoggingHandler(args.color, write=write)) logger.setLevel(logging.INFO) # Check if we have unresolved merge conflict files and fail fast. if _has_unmerged_paths(runner): logger.e...
https://github.com/pre-commit/pre-commit/issues/161
$ pre-commit run fixmyjs fixmyjs............................................................................................................................................................................................Failed hookid: fixmyjs Traceback (most recent call last): File "virtualenv_run/bin/pre-commit", lin...
UnicodeEncodeError
def staged_files_only(cmd_runner): """Clear any unstaged changes from the git working directory inside this context. Args: cmd_runner - PrefixedCommandRunner """ # Determine if there are unstaged files retcode, diff_stdout, _ = cmd_runner.run( ["git", "diff", "--ignore-submodule...
def staged_files_only(cmd_runner): """Clear any unstaged changes from the git working directory inside this context. Args: cmd_runner - PrefixedCommandRunner """ # Determine if there are unstaged files retcode, diff_stdout, _ = cmd_runner.run( ["git", "diff", "--ignore-submodule...
https://github.com/pre-commit/pre-commit/issues/85
$ pre-commit [WARNING] Unstaged files detected. [INFO] Stashing unstaged files to .../.pre-commit-files/patch1397853050. Traceback (most recent call last): File ".../bin/pre-commit", line 9, in <module> load_entry_point('pre-commit==0.0.0', 'console_scripts', 'pre-commit')() File ".../lib/python2.6/site-packages/pre_co...
UnicodeEncodeError
def run(runner, args, write=sys.stdout.write): # Set up our logging handler logger.addHandler(LoggingHandler(args.color, write=write)) logger.setLevel(logging.INFO) # Check if we have unresolved merge conflict files and fail fast. if _has_unmerged_paths(runner): logger.error("Unmerged files...
def run(runner, args, write=sys.stdout.write): # Set up our logging handler logger.addHandler(LoggingHandler(args.color, write=write)) logger.setLevel(logging.INFO) if args.no_stash or args.all_files: ctx = noop_context() else: ctx = staged_files_only(runner.cmd_runner) with ct...
https://github.com/pre-commit/pre-commit/issues/82
$ git diff --exit-code diff --cc foo.txt index 8ff26e7,c148433..0000000 --- a/foo.txt +++ b/foo.txt @@@ -1,4 -1,5 +1,11 @@@ asdf ++<<<<<<< HEAD +fdsa +yeah +yeah ++======= + asdf + asdf + asdf + ++>>>>>>> derp diff --git a/git_code_debt/generate.py b/git_code_debt/generate.py index 12ceec6..967506e 100644 --- a/git_cod...
pre_commit.prefixed_command_runner.CalledProcessError
def staged_files_only(cmd_runner): """Clear any unstaged changes from the git working directory inside this context. Args: cmd_runner - PrefixedCommandRunner """ # Determine if there are unstaged files retcode, diff_stdout, _ = cmd_runner.run( ["git", "diff", "--ignore-submodule...
def staged_files_only(cmd_runner): """Clear any unstaged changes from the git working directory inside this context. Args: cmd_runner - PrefixedCommandRunner """ # Determine if there are unstaged files retcode, _, _ = cmd_runner.run( ["git", "diff-files", "--quiet"], ret...
https://github.com/pre-commit/pre-commit/issues/76
$ pre-commit [WARNING] Unstaged files detected. Stashing unstaged files to /home/anthony/workspace/pre-commit/.pre-commit-files/patch1397370090. Trim Trailing Whitespace............................................Passed Fix End of Files....................................................Passed Check Yaml..................
pre_commit.prefixed_command_runner.CalledProcessError
def thumbnail(self, size, resample=BICUBIC, reducing_gap=2.0): """ Make this image into a thumbnail. This method modifies the image to contain a thumbnail version of itself, no larger than the given size. This method calculates an appropriate thumbnail size to preserve the aspect of the image, cal...
def thumbnail(self, size, resample=BICUBIC, reducing_gap=2.0): """ Make this image into a thumbnail. This method modifies the image to contain a thumbnail version of itself, no larger than the given size. This method calculates an appropriate thumbnail size to preserve the aspect of the image, cal...
https://github.com/python-pillow/Pillow/issues/4624
Traceback (most recent call last): File "<interactive input>", line 1, in <module> File "C:\Python38\lib\site-packages\PIL\Image.py", line 2279, in thumbnail y = round_aspect(x / aspect, key=lambda n: abs(aspect - x / n)) File "C:\Python38\lib\site-packages\PIL\Image.py", line 2272, in round_aspect return max(min(math....
ZeroDivisionError
def _open(self): if self.fp.read(8) != _MAGIC: raise SyntaxError("not a PNG file") self.__fp = self.fp self.__frame = 0 # # Parse headers up to the first IDAT or fDAT chunk self.png = PngStream(self.fp) while True: # # get next chunk cid, pos, length = sel...
def _open(self): if self.fp.read(8) != _MAGIC: raise SyntaxError("not a PNG file") self.__fp = self.fp self.__frame = 0 # # Parse headers up to the first IDAT or fDAT chunk self.png = PngStream(self.fp) while True: # # get next chunk cid, pos, length = sel...
https://github.com/python-pillow/Pillow/issues/4518
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/miniconda/envs/sunpy/lib/python3.8/site-packages/skimage/data/__init__.py", line 109, in camera return _load("camera.png") File "/opt/miniconda/envs/sunpy/lib/python3.8/site-packages/skimage/data/__init__.py", line 96, in _load return imr...
AttributeError
def fit(image, size, method=Image.NEAREST, bleed=0.0, centering=(0.5, 0.5)): """ Returns a sized and cropped version of the image, cropped to the requested aspect ratio and size. This function was contributed by Kevin Cazabon. :param image: The image to size and crop. :param size: The requeste...
def fit(image, size, method=Image.NEAREST, bleed=0.0, centering=(0.5, 0.5)): """ Returns a sized and cropped version of the image, cropped to the requested aspect ratio and size. This function was contributed by Kevin Cazabon. :param image: The image to size and crop. :param size: The requeste...
https://github.com/python-pillow/Pillow/issues/4087
Traceback (most recent call last): File "example.py", line 6, in <module> PIL.ImageOps.fit(img, (600, 453), PIL.Image.ANTIALIAS) File ".../lib/python3.7/site-packages/PIL/ImageOps.py", line 445, in fit return image.resize(size, method, box=crop) File ".../lib/python3.7/site-packages/PIL/Image.py", line 1892, in resize ...
ValueError
def _load_libtiff(self): """Overload method triggered when we detect a compressed tiff Calls out to libtiff""" pixel = Image.Image.load(self) if self.tile is None: raise IOError("cannot load this image") if not self.tile: return pixel self.load_prepare() if not len(self.t...
def _load_libtiff(self): """Overload method triggered when we detect a compressed tiff Calls out to libtiff""" pixel = Image.Image.load(self) if self.tile is None: raise IOError("cannot load this image") if not self.tile: return pixel self.load_prepare() if not len(self.t...
https://github.com/python-pillow/Pillow/issues/3756
['DEFAULT_STRATEGY', 'FILTERED', 'FIXED', 'HAVE_LIBJPEGTURBO', 'HUFFMAN_ONLY', 'PILLOW_VERSION', 'RLE', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'alpha_composite', 'bcn_decoder', 'bit_decoder', 'blend', 'clear_cache', 'convert', 'draw', 'effect_mandelbrot', 'effect_noise', 'eps_encode...
AttributeError
def _setup(self): """Setup this image object based on current tags""" if 0xBC01 in self.tag_v2: raise IOError("Windows Media Photo files not yet supported") # extract relevant tags self._compression = COMPRESSION_INFO[self.tag_v2.get(COMPRESSION, 1)] self._planar_configuration = self.tag_v...
def _setup(self): """Setup this image object based on current tags""" if 0xBC01 in self.tag_v2: raise IOError("Windows Media Photo files not yet supported") # extract relevant tags self._compression = COMPRESSION_INFO[self.tag_v2.get(COMPRESSION, 1)] self._planar_configuration = self.tag_v...
https://github.com/python-pillow/Pillow/issues/3756
['DEFAULT_STRATEGY', 'FILTERED', 'FIXED', 'HAVE_LIBJPEGTURBO', 'HUFFMAN_ONLY', 'PILLOW_VERSION', 'RLE', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'alpha_composite', 'bcn_decoder', 'bit_decoder', 'blend', 'clear_cache', 'convert', 'draw', 'effect_mandelbrot', 'effect_noise', 'eps_encode...
AttributeError
def _seek(self, frame): if frame == 0: # rewind self.__offset = 0 self.dispose = None self.dispose_extent = [0, 0, 0, 0] # x0, y0, x1, y1 self.__frame = -1 self.__fp.seek(self.__rewind) self._prev_im = None self.disposal_method = 0 else: #...
def _seek(self, frame): if frame == 0: # rewind self.__offset = 0 self.dispose = None self.dispose_extent = [0, 0, 0, 0] # x0, y0, x1, y1 self.__frame = -1 self.__fp.seek(self.__rewind) self._prev_im = None self.disposal_method = 0 else: #...
https://github.com/python-pillow/Pillow/issues/2383
Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/discord/ext/commands/core.py", line 50, in wrapped ret = yield from coro(*args, **kwargs) File "/root/discord/mods/Fun.py", line 313, in gmagik for image in glob.glob(gif_dir+"*_{0}.png".format(rand)): File "/usr/local/lib/python3.6/concurr...
UnboundLocalError
def __new__(cls, text, lang=None, tkey=None): """ :param cls: the class to use when creating the instance :param text: value for this key :param lang: language code :param tkey: UTF-8 version of the key name """ self = str.__new__(cls, text) self.lang = lang self.tkey = tkey ret...
def __new__(cls, text, lang, tkey): """ :param cls: the class to use when creating the instance :param text: value for this key :param lang: language code :param tkey: UTF-8 version of the key name """ self = str.__new__(cls, text) self.lang = lang self.tkey = tkey return self
https://github.com/python-pillow/Pillow/issues/1434
Traceback (most recent call last): File "example.py", line 6, in <module> new_im = pickle.loads(p) TypeError: __new__() missing 2 required positional arguments: 'lang' and 'tkey'
TypeError
def load_end(self): "internal: finished reading image data" while True: self.fp.read(4) # CRC try: cid, pos, length = self.png.read() except (struct.error, SyntaxError): break if cid == b"IEND": break try: self.png.call(...
def load_end(self): "internal: finished reading image data" while True: self.fp.read(4) # CRC try: cid, pos, length = self.png.read() except (struct.error, SyntaxError): break if cid == b"IEND": break try: self.png.call(...
https://github.com/python-pillow/Pillow/issues/3527
EOFError Traceback (most recent call last) <ipython-input-11-d946298b95dd> in <module> ----> 1 image.show() ~/py/ocean/ocean_ai/env/lib/python3.6/site-packages/PIL/Image.py in show(self, title, command) 2039 """ 2040 -> 2041 _show(self, title=title, command=command) 204...
EOFError
def convert(self, mode=None, matrix=None, dither=None, palette=WEB, colors=256): """ Returns a converted copy of this image. For the "P" mode, this method translates pixels through the palette. If mode is omitted, a mode is chosen so that all information in the image and the palette can be represen...
def convert(self, mode=None, matrix=None, dither=None, palette=WEB, colors=256): """ Returns a converted copy of this image. For the "P" mode, this method translates pixels through the palette. If mode is omitted, a mode is chosen so that all information in the image and the palette can be represen...
https://github.com/python-pillow/Pillow/issues/3150
Traceback (most recent call last): File "C:/base2_nl/py-grayscale/minimalExampleBug.py", line 5, in <module> im.save('tbbn2c16-out.png') File "C:\Python36\lib\site-packages\PIL\Image.py", line 1935, in save save_handler(self, fp, filename) File "C:\Python36\lib\site-packages\PIL\PngImagePlugin.py", line 790, in _save t...
TypeError
def multiline_text( self, xy, text, fill=None, font=None, anchor=None, spacing=4, align="left", direction=None, features=None, ): widths = [] max_width = 0 lines = self._multiline_split(text) line_spacing = self.textsize("A", font=font)[1] + spacing for line i...
def multiline_text( self, xy, text, fill=None, font=None, anchor=None, spacing=4, align="left", direction=None, features=None, ): widths = [] max_width = 0 lines = self._multiline_split(text) line_spacing = self.textsize("A", font=font)[1] + spacing for line i...
https://github.com/python-pillow/Pillow/issues/3231
Traceback (most recent call last): File "test.py", line 1, in <module> import PIL File "/usr/lib/python3.6/site-packages/PIL/__init__.py", line 27, in <module> __doc__ = __doc__.format(__version__) # include version in docstring AttributeError: 'NoneType' object has no attribute 'format'
AttributeError
def paste(self, im, box=None): """ Paste a PIL image into the photo image. Note that this can be very slow if the photo image is displayed. :param im: A PIL image. The size must match the target region. If the mode does not match, the image is converted to the mode of th...
def paste(self, im, box=None): """ Paste a PIL image into the photo image. Note that this can be very slow if the photo image is displayed. :param im: A PIL image. The size must match the target region. If the mode does not match, the image is converted to the mode of th...
https://github.com/python-pillow/Pillow/issues/3231
Traceback (most recent call last): File "test.py", line 1, in <module> import PIL File "/usr/lib/python3.6/site-packages/PIL/__init__.py", line 27, in <module> __doc__ = __doc__.format(__version__) # include version in docstring AttributeError: 'NoneType' object has no attribute 'format'
AttributeError
def APP(self, marker): # # Application marker. Store these in the APP dictionary. # Also look for well-known application markers. n = i16(self.fp.read(2)) - 2 s = ImageFile._safe_read(self.fp, n) app = "APP%d" % (marker & 15) self.app[app] = s # compatibility self.applist.append((ap...
def APP(self, marker): # # Application marker. Store these in the APP dictionary. # Also look for well-known application markers. n = i16(self.fp.read(2)) - 2 s = ImageFile._safe_read(self.fp, n) app = "APP%d" % (marker & 15) self.app[app] = s # compatibility self.applist.append((ap...
https://github.com/python-pillow/Pillow/issues/2481
In [1]: import PIL In [2]: PIL.PILLOW_VERSION Out[2]: '4.1.0' In [3]: from PIL import Image In [4]: Image.open('tests/sample/pictures/dir2/exo20101028-b-full.jpg') --------------------------------------------------------------------------- OSError Traceback (most recent call last) <...
OSError
def load(self): "Load image data based on tile list" pixel = Image.Image.load(self) if self.tile is None: raise IOError("cannot load this image") if not self.tile: return pixel self.map = None use_mmap = self.filename and len(self.tile) == 1 # As of pypy 2.1.0, memory mapp...
def load(self): "Load image data based on tile list" pixel = Image.Image.load(self) if self.tile is None: raise IOError("cannot load this image") if not self.tile: return pixel self.map = None use_mmap = self.filename and len(self.tile) == 1 # As of pypy 2.1.0, memory mapp...
https://github.com/python-pillow/Pillow/issues/2231
from PIL import Image im = Image.open('sunraster.im1') print im.format,im.size, im.mode SUN (640, 400) 1 im.load() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/PIL/ImageFile.py", line 240, in load raise_ioerror(err_code) File "/opt/rh...
IOError
def _open(self): # The Sun Raster file header is 32 bytes in length and has the following format: # typedef struct _SunRaster # { # DWORD MagicNumber; /* Magic (identification) number */ # DWORD Width; /* Width of image in pixels */ # DWORD Height...
def _open(self): # HEAD s = self.fp.read(32) if i32(s) != 0x59A66A95: raise SyntaxError("not an SUN raster file") offset = 32 self.size = i32(s[4:8]), i32(s[8:12]) depth = i32(s[12:16]) if depth == 1: self.mode, rawmode = "1", "1;I" elif depth == 8: self.mode =...
https://github.com/python-pillow/Pillow/issues/2231
from PIL import Image im = Image.open('sunraster.im1') print im.format,im.size, im.mode SUN (640, 400) 1 im.load() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/PIL/ImageFile.py", line 240, in load raise_ioerror(err_code) File "/opt/rh...
IOError
def _bitmap(self, header=0, offset=0): """Read relevant info about the BMP""" read, seek = self.fp.read, self.fp.seek if header: seek(header) file_info = dict() file_info["header_size"] = i32( read(4) ) # read bmp header size @offset 14 (this is part of the header size) file...
def _bitmap(self, header=0, offset=0): """Read relevant info about the BMP""" read, seek = self.fp.read, self.fp.seek if header: seek(header) file_info = dict() file_info["header_size"] = i32( read(4) ) # read bmp header size @offset 14 (this is part of the header size) file...
https://github.com/python-pillow/Pillow/issues/1293
ImageGrab.grabclipboard() --------------------------------------------------------------------------- IOError Traceback (most recent call last) <ipython-input-2-c8274e888e6c> in <module>() 1 from PIL import ImageGrab 2 ----> 3 ImageGrab.grabclipboard() C:\Anaconda\lib\site-packages\PI...
IOError
def _setitem(self, tag, value, legacy_api): basetypes = (Number, bytes, str) if bytes is str: basetypes += (unicode,) info = TiffTags.lookup(tag) values = [value] if isinstance(value, basetypes) else value if tag not in self.tagtype: if info.type: self.tagtype[tag] = in...
def _setitem(self, tag, value, legacy_api): basetypes = (Number, bytes, str) if bytes is str: basetypes += (unicode,) info = TiffTags.lookup(tag) values = [value] if isinstance(value, basetypes) else value if tag not in self.tagtype: if info.type: self.tagtype[tag] = in...
https://github.com/python-pillow/Pillow/issues/1462
Traceback (most recent call last): File "pyi_lib_PIL_img_conversion.py", line 17, in <module> im.save(os.path.join(basedir, "tinysample.png")) File "c:\Users\Rio\Documents\src\pyinst1328\.env27\lib\site-packages\PIL\Image.py", line 1665, in save save_handler(self, fp, filename) File "c:\Users\Rio\Documents\src\pyinst13...
TypeError
def load_byte(self, data, legacy_api=True): return data
def load_byte(self, data, legacy_api=True): return data if legacy_api else tuple(map(ord, data) if bytes is str else data)
https://github.com/python-pillow/Pillow/issues/1462
Traceback (most recent call last): File "pyi_lib_PIL_img_conversion.py", line 17, in <module> im.save(os.path.join(basedir, "tinysample.png")) File "c:\Users\Rio\Documents\src\pyinst1328\.env27\lib\site-packages\PIL\Image.py", line 1665, in save save_handler(self, fp, filename) File "c:\Users\Rio\Documents\src\pyinst13...
TypeError
def get_sampling(im): # There's no subsampling when image have only 1 layer # (grayscale images) or when they are CMYK (4 layers), # so set subsampling to default value. # # NOTE: currently Pillow can't encode JPEG to YCCK format. # If YCCK support is added in the future, subsampling code will h...
def get_sampling(im): sampling = im.layer[0][1:3] + im.layer[1][1:3] + im.layer[2][1:3] return samplings.get(sampling, -1)
https://github.com/python-pillow/Pillow/issues/857
$ ipython Python 2.7.6 (default, Apr 3 2014, 19:58:06) Type "copyright", "credits" or "license" for more information. IPython 2.1.0 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details...
IndexError
def openid(): oidc_configuration, jwt_key_set = get_oidc_configuration(current_app) token_endpoint = oidc_configuration["token_endpoint"] userinfo_endpoint = oidc_configuration["userinfo_endpoint"] data = { "grant_type": "authorization_code", "code": request.json["code"], "redir...
def openid(): oidc_configuration, jwt_key_set = get_oidc_configuration(current_app) token_endpoint = oidc_configuration["token_endpoint"] userinfo_endpoint = oidc_configuration["userinfo_endpoint"] data = { "grant_type": "authorization_code", "code": request.json["code"], "redir...
https://github.com/alerta/alerta/issues/1336
Oct 15 10:45:04 influx alertad[28913]: 2020-10-15 10:45:04,542 alerta.app[28919]: [ERROR] duplicate key value violates unique constraint "users_email_key" DETAIL: Key (email)=(xxxxxx@xxxxx) already exists. request_id=7f8eab74-9c03-4d36-a92f-c5c0d82b3c6f ip=80.120.197.114 Traceback (most recent call last): File "/opt/a...
psycopg2.errors.UniqueViolation
def __init__( self, iss: str, typ: str, sub: str, aud: str, exp: dt, nbf: dt, iat: dt, jti: str = None, **kwargs, ) -> None: self.issuer = iss self.type = typ self.subject = sub self.audience = aud self.expiration = exp self.not_before = nbf self.issue...
def __init__( self, iss: str, typ: str, sub: str, aud: str, exp: dt, nbf: dt, iat: dt, jti: str = None, **kwargs, ) -> None: self.issuer = iss self.type = typ self.subject = sub self.audience = aud self.expiration = exp self.not_before = nbf self.issue...
https://github.com/alerta/alerta/issues/1336
Oct 15 10:45:04 influx alertad[28913]: 2020-10-15 10:45:04,542 alerta.app[28919]: [ERROR] duplicate key value violates unique constraint "users_email_key" DETAIL: Key (email)=(xxxxxx@xxxxx) already exists. request_id=7f8eab74-9c03-4d36-a92f-c5c0d82b3c6f ip=80.120.197.114 Traceback (most recent call last): File "/opt/a...
psycopg2.errors.UniqueViolation
def parse( cls, token: str, key: str = None, verify: bool = True, algorithm: str = "HS256" ) -> "Jwt": try: json = jwt.decode( token, key=key or current_app.config["SECRET_KEY"], verify=verify, algorithms=algorithm, audience=current_app.config[...
def parse( cls, token: str, key: str = None, verify: bool = True, algorithm: str = "HS256" ) -> "Jwt": try: json = jwt.decode( token, key=key or current_app.config["SECRET_KEY"], verify=verify, algorithms=algorithm, audience=current_app.config[...
https://github.com/alerta/alerta/issues/1336
Oct 15 10:45:04 influx alertad[28913]: 2020-10-15 10:45:04,542 alerta.app[28919]: [ERROR] duplicate key value violates unique constraint "users_email_key" DETAIL: Key (email)=(xxxxxx@xxxxx) already exists. request_id=7f8eab74-9c03-4d36-a92f-c5c0d82b3c6f ip=80.120.197.114 Traceback (most recent call last): File "/opt/a...
psycopg2.errors.UniqueViolation
def serialize(self) -> Dict[str, Any]: data = { "iss": self.issuer, "typ": self.type, "sub": self.subject, "aud": self.audience, "exp": self.expiration, "nbf": self.not_before, "iat": self.issued_at, "jti": self.jwt_id, } if self.name: ...
def serialize(self) -> Dict[str, Any]: data = { "iss": self.issuer, "typ": self.type, "sub": self.subject, "aud": self.audience, "exp": self.expiration, "nbf": self.not_before, "iat": self.issued_at, "jti": self.jwt_id, } if self.name: ...
https://github.com/alerta/alerta/issues/1336
Oct 15 10:45:04 influx alertad[28913]: 2020-10-15 10:45:04,542 alerta.app[28919]: [ERROR] duplicate key value violates unique constraint "users_email_key" DETAIL: Key (email)=(xxxxxx@xxxxx) already exists. request_id=7f8eab74-9c03-4d36-a92f-c5c0d82b3c6f ip=80.120.197.114 Traceback (most recent call last): File "/opt/a...
psycopg2.errors.UniqueViolation
def housekeeping(): expired_threshold = request.args.get( "expired", default=current_app.config["DEFAULT_EXPIRED_DELETE_HRS"], type=int ) info_threshold = request.args.get( "info", default=current_app.config["DEFAULT_INFO_DELETE_HRS"], type=int ) has_expired, has_timedout = Alert.ho...
def housekeeping(): expired_threshold = request.args.get( "expired", current_app.config["DEFAULT_EXPIRED_DELETE_HRS"], type="int" ) info_threshold = request.args.get( "info", current_app.config["DEFAULT_INFO_DELETE_HRS"], type="int" ) has_expired, has_timedout = Alert.housekeeping(e...
https://github.com/alerta/alerta/issues/1260
$ /opt/alerta/bin/alerta housekeeping --expired 72 --info 72 Error: {"code":500,"errors":["Traceback (most recent call last):\n File \"/opt/alerta/lib64/python3.6/site-packages/flask/app.py\", line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/opt/alerta/lib64/python3.6/site-packages/flas...
nTypeError
def __init__(self, match: str, scopes: List[Scope], **kwargs) -> None: for s in scopes: if s not in list(Scope): raise ValueError("invalid scope: {}".format(s)) self.id = kwargs.get("id", str(uuid4())) self.match = match self.scopes = scopes or list()
def __init__(self, match: str, scopes: List[Scope], **kwargs) -> None: self.id = kwargs.get("id", str(uuid4())) self.match = match self.scopes = scopes or list()
https://github.com/alerta/alerta/issues/1075
{ "code": 500, "errors": [ "ValueError: 'read:prodalerts' is not a valid Scope\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"/app/.heroku/python/lib/python3.7/site-packages/flask/app.py\", line 1813, in full_dispatch_request\n rv = self.dispatc...
ValueError
def __init__(self, resource: str, event: str, **kwargs) -> None: if not resource: raise ValueError('Missing mandatory value for "resource"') if not event: raise ValueError('Missing mandatory value for "event"') if any(["." in key for key in kwargs.get("attributes", dict()).keys()]) or any( ...
def __init__(self, resource: str, event: str, **kwargs) -> None: if not resource: raise ValueError('Missing mandatory value for "resource"') if not event: raise ValueError('Missing mandatory value for "event"') if any(["." in key for key in kwargs.get("attributes", dict()).keys()]) or any( ...
https://github.com/alerta/alerta/issues/911
result = aclient.get_alert("5645884f-f486-4db3-8058-46e17260fb95") Traceback (most recent call last): File "/Users/thomasjongerius/Library/Preferences/PyCharmCE2017.3/scratches/scratch_36.py", line 13, in <module> result = aclient.get_alert("5645884f-f486-4db3-8058-46e17260fb95") File "/Users/thomasjongerius/PycharmPro...
ValueError
def __init__( self, origin: str = None, tags: List[str] = None, create_time: datetime = None, timeout: int = None, customer: str = None, **kwargs, ) -> None: timeout = ( timeout if timeout is not None else current_app.config["HEARTBEAT_TIMEOUT"] ) try: timeout = i...
def __init__( self, origin: str = None, tags: List[str] = None, create_time: datetime = None, timeout: int = None, customer: str = None, **kwargs, ) -> None: self.id = kwargs.get("id", str(uuid4())) self.origin = origin or "{}/{}".format( os.path.basename(sys.argv[0]), platfo...
https://github.com/alerta/alerta/issues/911
result = aclient.get_alert("5645884f-f486-4db3-8058-46e17260fb95") Traceback (most recent call last): File "/Users/thomasjongerius/Library/Preferences/PyCharmCE2017.3/scratches/scratch_36.py", line 13, in <module> result = aclient.get_alert("5645884f-f486-4db3-8058-46e17260fb95") File "/Users/thomasjongerius/PycharmPro...
ValueError
def parse_grafana( alert: JSON, match: Dict[str, Any], args: ImmutableMultiDict ) -> Alert: alerting_severity = args.get("severity", "major") if alert["state"] == "alerting": severity = alerting_severity elif alert["state"] == "ok": severity = "normal" else: severity = "inde...
def parse_grafana( alert: JSON, match: Dict[str, Any], args: ImmutableMultiDict ) -> Alert: alerting_severity = args.get("severity", "major") if alert["state"] == "alerting": severity = alerting_severity elif alert["state"] == "ok": severity = "normal" else: severity = "inde...
https://github.com/alerta/alerta/issues/911
result = aclient.get_alert("5645884f-f486-4db3-8058-46e17260fb95") Traceback (most recent call last): File "/Users/thomasjongerius/Library/Preferences/PyCharmCE2017.3/scratches/scratch_36.py", line 13, in <module> result = aclient.get_alert("5645884f-f486-4db3-8058-46e17260fb95") File "/Users/thomasjongerius/PycharmPro...
ValueError
def setup_logging(app): del app.logger.handlers[:] # for key in logging.Logger.manager.loggerDict: # print(key) loggers = [ app.logger, logging.getLogger("alerta"), # ?? # logging.getLogger('flask'), # ?? logging.getLogger("flask_compress"), # ?? # loggin...
def setup_logging(app): del app.logger.handlers[:] # for key in logging.Logger.manager.loggerDict: # print(key) loggers = [ app.logger, logging.getLogger("alerta"), # ?? # logging.getLogger('flask'), # ?? logging.getLogger("flask_compress"), # ?? # loggin...
https://github.com/alerta/alerta/issues/583
--- Logging error --- Traceback (most recent call last): File "/usr/lib64/python3.5/logging/__init__.py", line 988, in emit stream.write(msg) UnicodeEncodeError: 'ascii' codec can't encode character '\\u5e74' in position 1710: ordinal not in range(128) Call stack: File "/usr/lib/python3.5/site-packages/flask/app.py", l...
UnicodeEncodeError
def parse_prometheus(alert, external_url): status = alert.get("status", "firing") labels = copy(alert["labels"]) annotations = copy(alert["annotations"]) starts_at = parse_date(alert["startsAt"]) if alert["endsAt"] == "0001-01-01T00:00:00Z": ends_at = None else: ends_at = parse...
def parse_prometheus(alert, external_url): status = alert.get("status", "firing") labels = copy(alert["labels"]) annotations = copy(alert["annotations"]) starts_at = parse_date(alert["startsAt"]) if alert["endsAt"] == "0001-01-01T00:00:00Z": ends_at = None else: ends_at = parse...
https://github.com/alerta/alerta/issues/596
alerta_1 | 2018-08-05 21:56:22,585 DEBG 'uwsgi' stdout output: alerta_1 | [pid: 71|app: 0|req: 218/1482] 172.30.0.2 () {38 vars in 518 bytes} [Sun Aug 5 21:56:22 2018] POST /api/webhooks/prometheus => generated 1088 bytes in 329 msecs (HTTP/1.1 500) 4 headers in 153 bytes (1 switches on core 0) alerta_1 ...
KeyError
def parse_notification(notification): if notification["Type"] == "SubscriptionConfirmation": return Alert( resource=notification["TopicArn"], event=notification["Type"], environment="Production", severity="informational", service=["Unknown"], ...
def parse_notification(notification): notification = json.loads(notification) if notification["Type"] == "SubscriptionConfirmation": return Alert( resource=notification["TopicArn"], event=notification["Type"], environment="Production", severity="informati...
https://github.com/alerta/alerta/issues/565
Traceback (most recent call last): File "/opt/alerta/venv/lib/python3.5/site-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/opt/alerta/venv/lib/python3.5/site-packages/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args...
TypeError
def cloudwatch(): try: incomingAlert = parse_notification(request.json) except ValueError as e: raise ApiError(str(e), 400) incomingAlert.customer = assign_customer(wanted=incomingAlert.customer) add_remote_ip(request, incomingAlert) try: alert = process_alert(incomingAlert...
def cloudwatch(): try: incomingAlert = parse_notification(request.data) except ValueError as e: raise ApiError(str(e), 400) incomingAlert.customer = assign_customer(wanted=incomingAlert.customer) add_remote_ip(request, incomingAlert) try: alert = process_alert(incomingAlert...
https://github.com/alerta/alerta/issues/565
Traceback (most recent call last): File "/opt/alerta/venv/lib/python3.5/site-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/opt/alerta/venv/lib/python3.5/site-packages/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args...
TypeError
def cloudwatch(): try: incomingAlert = parse_notification(request.get_json(force=True)) except ValueError as e: raise ApiError(str(e), 400) incomingAlert.customer = assign_customer(wanted=incomingAlert.customer) add_remote_ip(request, incomingAlert) try: alert = process_ale...
def cloudwatch(): try: incomingAlert = parse_notification(request.json) except ValueError as e: raise ApiError(str(e), 400) incomingAlert.customer = assign_customer(wanted=incomingAlert.customer) add_remote_ip(request, incomingAlert) try: alert = process_alert(incomingAlert...
https://github.com/alerta/alerta/issues/565
Traceback (most recent call last): File "/opt/alerta/venv/lib/python3.5/site-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/opt/alerta/venv/lib/python3.5/site-packages/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args...
TypeError
def housekeeping(self, expired_threshold, info_threshold): # delete 'closed' or 'expired' alerts older than "expired_threshold" hours # and 'informational' alerts older than "info_threshold" hours expired_hours_ago = datetime.utcnow() - timedelta(hours=expired_threshold) g.db.alerts.remove( { ...
def housekeeping(self, expired_threshold, info_threshold): # delete 'closed' or 'expired' alerts older than "expired_threshold" hours # and 'informational' alerts older than "info_threshold" hours expired_hours_ago = datetime.utcnow() - timedelta(hours=expired_threshold) g.db.alerts.remove( { ...
https://github.com/alerta/alerta/issues/528
2018-04-28 00:06:43,862 - alerta[18702]: ERROR - HOUSEKEEPING FAILED: Type names and field names can only contain alphanumeric characters and underscores: '?column?' [in /usr/lib/python2.7/site-packages/alerta_server-5.2.0_-py2.7.egg/alerta/exceptions.py:67] Traceback (most recent call last): File "/usr/lib/python2.7/s...
ApiError