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 _fix_py3_plus(contents_text): # type: (str) -> str try: ast_obj = ast_parse(contents_text) except SyntaxError: return contents_text visitor = FindPy3Plus() visitor.visit(ast_obj) if not any( ( visitor.bases_to_remove, visitor.encode_calls, ...
def _fix_py3_plus(contents_text): # type: (str) -> str try: ast_obj = ast_parse(contents_text) except SyntaxError: return contents_text visitor = FindPy3Plus() visitor.visit(ast_obj) if not any( ( visitor.bases_to_remove, visitor.encode_calls, ...
https://github.com/asottile/pyupgrade/issues/246
Traceback (most recent call last): File ".../venv/bin/pyupgrade", line 10, in <module> sys.exit(main()) File ".../venv/lib64/python3.8/site-packages/pyupgrade.py", line 2318, in main ret |= _fix_file(filename, args) File ".../venv/lib64/python3.8/site-packages/pyupgrade.py", line 2280, in _fix_file contents_text = _fix...
IndexError
def visit_Call(self, node): # type: (ast.Call) -> None if ( isinstance(node.func, ast.Name) and node.func.id in {"isinstance", "issubclass"} and len(node.args) == 2 and self._is_six(node.args[1], SIX_TYPE_CTX_ATTRS) ): arg = node.args[1] # _is_six() enforces this...
def visit_Call(self, node): # type: (ast.Call) -> None if ( isinstance(node.func, ast.Name) and node.func.id in {"isinstance", "issubclass"} and len(node.args) == 2 and self._is_six(node.args[1], SIX_TYPE_CTX_ATTRS) ): arg = node.args[1] # _is_six() enforces this...
https://github.com/asottile/pyupgrade/issues/215
$ pyupgrade --py3-plus more_itertools/recipes.py Traceback (most recent call last): File "/home/jdufresne/.venv/more-itertools/bin/pyupgrade", line 10, in <module> sys.exit(main()) File "/home/jdufresne/.venv/more-itertools/lib64/python3.7/site-packages/pyupgrade.py", line 2237, in main ret |= _fix_file(filename, args)...
IndexError
def visit_ClassDef(self, node): # type: (ast.ClassDef) -> None for decorator in node.decorator_list: if self._is_six(decorator, ("python_2_unicode_compatible",)): self.six_remove_decorators.add(_ast_to_offset(decorator)) for base in node.bases: if isinstance(base, ast.Name) and bas...
def visit_ClassDef(self, node): # type: (ast.ClassDef) -> None for decorator in node.decorator_list: if self._is_six(decorator, ("python_2_unicode_compatible",)): self.six_remove_decorators.add(_ast_to_offset(decorator)) for base in node.bases: if isinstance(base, ast.Name) and bas...
https://github.com/asottile/pyupgrade/issues/144
% pyupgrade --py3-only --keep-percent-format src/_pytest/fixtures.py Traceback (most recent call last): File "…/Vcs/pytest/.venv/bin/pyupgrade", line 11, in <module> sys.exit(main()) File "…/Vcs/pytest/.venv/lib/python3.7/site-packages/pyupgrade.py", line 1428, in main ret |= fix_file(filename, args) File "…/Vcs/pytest...
IndexError
def visit_Call(self, node): # type: (ast.Call) -> None if ( isinstance(node.func, ast.Name) and node.func.id in {"isinstance", "issubclass"} and len(node.args) == 2 and self._is_six(node.args[1], SIX_TYPE_CTX_ATTRS) ): self.six_type_ctx[_ast_to_offset(node.args[1])] = no...
def visit_Call(self, node): # type: (ast.Call) -> None if ( isinstance(node.func, ast.Name) and node.func.id in {"isinstance", "issubclass"} and len(node.args) == 2 and self._is_six(node.args[1], SIX_TYPE_CTX_ATTRS) ): self.six_type_ctx[_ast_to_offset(node.args[1])] = no...
https://github.com/asottile/pyupgrade/issues/144
% pyupgrade --py3-only --keep-percent-format src/_pytest/fixtures.py Traceback (most recent call last): File "…/Vcs/pytest/.venv/bin/pyupgrade", line 11, in <module> sys.exit(main()) File "…/Vcs/pytest/.venv/lib/python3.7/site-packages/pyupgrade.py", line 1428, in main ret |= fix_file(filename, args) File "…/Vcs/pytest...
IndexError
def _fix_format_literals(contents_text): try: tokens = src_to_tokens(contents_text) except tokenize.TokenError: return contents_text to_replace = [] string_start = None string_end = None seen_dot = False for i, token in enumerate(tokens): if string_start is None and...
def _fix_format_literals(contents_text): tokens = src_to_tokens(contents_text) to_replace = [] string_start = None string_end = None seen_dot = False for i, token in enumerate(tokens): if string_start is None and token.name == "STRING": string_start = i string_e...
https://github.com/asottile/pyupgrade/issues/145
filename1.py filename2.py Traceback (most recent call last): File "/home/thomas/miniconda/envs/py37/bin/pyupgrade", line 10, in <module> sys.exit(main()) File "/home/thomas/miniconda/envs/py37/lib/python3.7/site-packages/pyupgrade.py", line 1428, in main ret |= fix_file(filename, args) File "/home/thomas/miniconda/envs...
tokenize.TokenError
def _fix_py2_compatible(contents_text): try: ast_obj = ast_parse(contents_text) except SyntaxError: return contents_text visitor = Py2CompatibleVisitor() visitor.visit(ast_obj) if not any( ( visitor.dicts, visitor.sets, visitor.set_empty_li...
def _fix_py2_compatible(contents_text): try: ast_obj = ast_parse(contents_text) except SyntaxError: return contents_text visitor = Py2CompatibleVisitor() visitor.visit(ast_obj) if not any( ( visitor.dicts, visitor.sets, visitor.set_empty_li...
https://github.com/asottile/pyupgrade/issues/145
filename1.py filename2.py Traceback (most recent call last): File "/home/thomas/miniconda/envs/py37/bin/pyupgrade", line 10, in <module> sys.exit(main()) File "/home/thomas/miniconda/envs/py37/lib/python3.7/site-packages/pyupgrade.py", line 1428, in main ret |= fix_file(filename, args) File "/home/thomas/miniconda/envs...
tokenize.TokenError
def _fix_percent_format(contents_text): try: ast_obj = ast_parse(contents_text) except SyntaxError: return contents_text visitor = FindPercentFormats() visitor.visit(ast_obj) if not visitor.found: return contents_text try: tokens = src_to_tokens(contents_text) ...
def _fix_percent_format(contents_text): try: ast_obj = ast_parse(contents_text) except SyntaxError: return contents_text visitor = FindPercentFormats() visitor.visit(ast_obj) if not visitor.found: return contents_text tokens = src_to_tokens(contents_text) for i, t...
https://github.com/asottile/pyupgrade/issues/145
filename1.py filename2.py Traceback (most recent call last): File "/home/thomas/miniconda/envs/py37/bin/pyupgrade", line 10, in <module> sys.exit(main()) File "/home/thomas/miniconda/envs/py37/lib/python3.7/site-packages/pyupgrade.py", line 1428, in main ret |= fix_file(filename, args) File "/home/thomas/miniconda/envs...
tokenize.TokenError
def _fix_py3_plus(contents_text): try: ast_obj = ast_parse(contents_text) except SyntaxError: return contents_text visitor = FindPy3Plus() visitor.visit(ast_obj) if not any( ( visitor.bases_to_remove, visitor.native_literals, visitor.six_...
def _fix_py3_plus(contents_text): try: ast_obj = ast_parse(contents_text) except SyntaxError: return contents_text visitor = FindPy3Plus() visitor.visit(ast_obj) if not any( ( visitor.bases_to_remove, visitor.native_literals, visitor.six_...
https://github.com/asottile/pyupgrade/issues/145
filename1.py filename2.py Traceback (most recent call last): File "/home/thomas/miniconda/envs/py37/bin/pyupgrade", line 10, in <module> sys.exit(main()) File "/home/thomas/miniconda/envs/py37/lib/python3.7/site-packages/pyupgrade.py", line 1428, in main ret |= fix_file(filename, args) File "/home/thomas/miniconda/envs...
tokenize.TokenError
def _fix_fstrings(contents_text): try: ast_obj = ast_parse(contents_text) except SyntaxError: return contents_text visitor = FindSimpleFormats() visitor.visit(ast_obj) if not visitor.found: return contents_text try: tokens = src_to_tokens(contents_text) exc...
def _fix_fstrings(contents_text): try: ast_obj = ast_parse(contents_text) except SyntaxError: return contents_text visitor = FindSimpleFormats() visitor.visit(ast_obj) if not visitor.found: return contents_text tokens = src_to_tokens(contents_text) for i, token in ...
https://github.com/asottile/pyupgrade/issues/145
filename1.py filename2.py Traceback (most recent call last): File "/home/thomas/miniconda/envs/py37/bin/pyupgrade", line 10, in <module> sys.exit(main()) File "/home/thomas/miniconda/envs/py37/lib/python3.7/site-packages/pyupgrade.py", line 1428, in main ret |= fix_file(filename, args) File "/home/thomas/miniconda/envs...
tokenize.TokenError
def visit_Call(self, node): # type: (ast.Call) -> None if ( isinstance(node.func, ast.Attribute) and isinstance(node.func.value, ast.Str) and node.func.attr == "format" and all(_simple_arg(arg) for arg in node.args) and all(_simple_arg(k.value) for k in node.keywords) ...
def visit_Call(self, node): # type: (ast.Call) -> None if ( isinstance(node.func, ast.Attribute) and isinstance(node.func.value, ast.Str) and node.func.attr == "format" and all(_simple_arg(arg) for arg in node.args) and all(_simple_arg(k.value) for k in node.keywords) ...
https://github.com/asottile/pyupgrade/issues/134
Traceback (most recent call last): File "/home/ethan/venv/bin/pyupgrade", line 10, in <module> sys.exit(main()) File "/home/ethan/venv/lib/python3.7/site-packages/pyupgrade.py", line 1396, in main ret |= fix_file(filename, args) File "/home/ethan/venv/lib/python3.7/site-packages/pyupgrade.py", line 1372, in fix_file co...
KeyError
def visit_Call(self, node): # type: (ast.Call) -> None if ( isinstance(node.func, ast.Attribute) and isinstance(node.func.value, ast.Str) and node.func.attr == "format" and all(_simple_arg(arg) for arg in node.args) and all(_simple_arg(k.value) for k in node.keywords) ...
def visit_Call(self, node): # type: (ast.Call) -> None if ( isinstance(node.func, ast.Attribute) and isinstance(node.func.value, ast.Str) and node.func.attr == "format" and all(_simple_arg(arg) for arg in node.args) and all(_simple_arg(k.value) for k in node.keywords) ...
https://github.com/asottile/pyupgrade/issues/134
Traceback (most recent call last): File "/home/ethan/venv/bin/pyupgrade", line 10, in <module> sys.exit(main()) File "/home/ethan/venv/lib/python3.7/site-packages/pyupgrade.py", line 1396, in main ret |= fix_file(filename, args) File "/home/ethan/venv/lib/python3.7/site-packages/pyupgrade.py", line 1372, in fix_file co...
KeyError
def _to_fstring(src, call): params = {} for i, arg in enumerate(call.args): params[str(i)] = _unparse(arg) for kwd in call.keywords: params[kwd.arg] = _unparse(kwd.value) parts = [] i = 0 for s, name, spec, conv in parse_format("f" + src): if name is not None: ...
def _to_fstring(src, call): params = {} for i, arg in enumerate(call.args): params[str(i)] = _unparse(arg) for kwd in call.keywords: params[kwd.arg] = _unparse(kwd.value) parts = [] for i, (s, name, spec, conv) in enumerate(parse_format("f" + src)): if name is not None: ...
https://github.com/asottile/pyupgrade/issues/52
Traceback (most recent call last): File "/usr/bin/pyupgrade", line 11, in <module> sys.exit(main()) File "/usr/lib/python3.7/site-packages/pyupgrade.py", line 907, in main ret |= fix_file(filename, args) File "/usr/lib/python3.7/site-packages/pyupgrade.py", line 884, in fix_file contents_text = _fix_fstrings(contents_t...
KeyError
async def setup(self, *, creator=None, category=None, initial_message=None): """Create the thread channel and other io related initialisation tasks""" self.bot.dispatch("thread_initiate", self) recipient = self.recipient # in case it creates a channel outside of category overwrites = { self...
async def setup(self, *, creator=None, category=None, initial_message=None): """Create the thread channel and other io related initialisation tasks""" self.bot.dispatch("thread_initiate", self) recipient = self.recipient # in case it creates a channel outside of category overwrites = { self...
https://github.com/kyb3r/modmail/issues/2934
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body In name: Contains words not allowed for servers in Server Discovery. 2021-01-11 08:45:24 __main__[762] - ERROR: Failed to send message: Traceback (most recent call last): File "/app/bot.py", line 760, in process_dm_modmail await thread...
AttributeError
def format_channel_name(author, guild, exclude_channel=None, force_null=False): """Sanitises a username for use with text channel names""" name = author.name.lower() if force_null: name = "null" name = new_name = ( "".join(l for l in name if l not in string.punctuation and l.isprintable...
def format_channel_name(author, guild, exclude_channel=None): """Sanitises a username for use with text channel names""" name = author.name.lower() name = new_name = ( "".join(l for l in name if l not in string.punctuation and l.isprintable()) or "null" ) + f"-{author.discriminator}" ...
https://github.com/kyb3r/modmail/issues/2934
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body In name: Contains words not allowed for servers in Server Discovery. 2021-01-11 08:45:24 __main__[762] - ERROR: Failed to send message: Traceback (most recent call last): File "/app/bot.py", line 760, in process_dm_modmail await thread...
AttributeError
async def find_linked_message_from_dm(self, message, either_direction=False): if either_direction and message.embeds and message.embeds[0].author.url: compare_url = message.embeds[0].author.url compare_id = compare_url.split("#")[-1] else: compare_url = None compare_id = None ...
async def find_linked_message_from_dm(self, message, either_direction=False): if either_direction and message.embeds: compare_url = message.embeds[0].author.url compare_id = compare_url.split("#")[-1] else: compare_url = None compare_id = None if self.channel is not None: ...
https://github.com/kyb3r/modmail/issues/2931
2021-01-09T15:38:32.286633+00:00 app[worker.1]: 01/09/21 15:38:32 __main__[1402] - ERROR: Ignoring exception in on_raw_reaction_add. 2021-01-09T15:38:32.288758+00:00 app[worker.1]: 01/09/21 15:38:32 __main__[1403] - ERROR: Unexpected exception: 2021-01-09T15:38:32.288760+00:00 app[worker.1]: Traceback (most recent call...
AttributeError
async def on_raw_reaction_add(self, payload): if self.config["transfer_reactions"]: await self.handle_reaction_events(payload)
async def on_raw_reaction_add(self, payload): await self.handle_reaction_events(payload)
https://github.com/kyb3r/modmail/issues/2783
Traceback (most recent call last): File "/app/.heroku/python/lib/python3.7/site-packages/discord/client.py", line 270, in _run_event await coro(*args, **kwargs) File "bot.py", line 868, in on_message await self.process_commands(message) File "bot.py", line 875, in process_commands return await self.process_dm_modmail(m...
AttributeError
async def on_raw_reaction_remove(self, payload): if self.config["transfer_reactions"]: await self.handle_reaction_events(payload)
async def on_raw_reaction_remove(self, payload): await self.handle_reaction_events(payload)
https://github.com/kyb3r/modmail/issues/2783
Traceback (most recent call last): File "/app/.heroku/python/lib/python3.7/site-packages/discord/client.py", line 270, in _run_event await coro(*args, **kwargs) File "bot.py", line 868, in on_message await self.process_commands(message) File "bot.py", line 875, in process_commands return await self.process_dm_modmail(m...
AttributeError
def _extract_sorting(self, limit): # Permissions entries are not stored with timestamp, so do not # force it. result = super()._extract_sorting(limit) without_last_modified = [s for s in result if s.field != self.model.modified_field] # For pagination, there must be at least one sort criteria. #...
def _extract_sorting(self, limit): # Permissions entries are not stored with timestamp, so do not # force it. result = super()._extract_sorting(limit) without_last_modified = [s for s in result if s.field != self.model.modified_field] return without_last_modified
https://github.com/Kinto/kinto/issues/1157
ERROR:root:list index out of range Traceback (most recent call last): File "/home/niko/work/kinto-http.js/.venv/lib/python3.5/site-packages/pyramid/tweens.py", line 22, in excview_tween response = handler(request) File "/home/niko/work/kinto-http.js/.venv/lib/python3.5/site-packages/pyramid_tm/__init__.py", line 119, i...
IndexError
def includeme(config): config.add_api_capability( "accounts", description="Manage user accounts.", url="https://kinto.readthedocs.io/en/latest/api/1.x/accounts.html", ) config.scan("kinto.plugins.accounts.views") PERMISSIONS_INHERITANCE_TREE[""].update({"account:create": {}}) ...
def includeme(config): config.add_api_capability( "accounts", description="Manage user accounts.", url="https://kinto.readthedocs.io/en/latest/api/1.x/accounts.html", ) config.scan("kinto.plugins.accounts.views") PERMISSIONS_INHERITANCE_TREE[""].update({"account:create": {}}) ...
https://github.com/Kinto/kinto/issues/1177
Traceback (most recent call last): File "/Users/gsurita/kinto/kinto/.venv/lib/python3.6/site-packages/pyramid/tweens.py", line 22, in excview_tween response = handler(request) File "/Users/gsurita/kinto/kinto/.venv/lib/python3.6/site-packages/pyramid_tm/__init__.py", line 119, in tm_tween reraise(*exc_info) File "/User...
KeyError
def account_check(username, password, request): parent_id = username try: existing = request.registry.storage.get( parent_id=parent_id, collection_id="account", object_id=username ) except storage_exceptions.RecordNotFoundError: return None hashed = existing["passwor...
def account_check(username, password, request): parent_id = username try: existing = request.registry.storage.get( parent_id=parent_id, collection_id="account", object_id=username ) except storage_exceptions.RecordNotFoundError: return None hashed = existing["passwor...
https://github.com/Kinto/kinto/issues/1224
Unicode-objects must be encoded before hashing Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/pyramid/tweens.py", line 22, in excview_tween response = handler(request) File "/usr/local/lib/python3.5/dist-packages/pyramid_tm/__init__.py", line 119, in tm_tween reraise(*exc_info) File "/u...
TypeError
def process_record(self, new, old=None): new = super(Account, self).process_record(new, old) # Store password safely in database as str # (bcrypt.hashpw returns base64 bytes). pwd_str = new["password"].encode(encoding="utf-8") hashed = bcrypt.hashpw(pwd_str, bcrypt.gensalt()) new["password"] = ...
def process_record(self, new, old=None): new = super(Account, self).process_record(new, old) # Store password safely in database. pwd_str = new["password"].encode(encoding="utf-8") new["password"] = bcrypt.hashpw(pwd_str, bcrypt.gensalt()) # Administrators can reach other accounts and anonymous ha...
https://github.com/Kinto/kinto/issues/1224
Unicode-objects must be encoded before hashing Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/pyramid/tweens.py", line 22, in excview_tween response = handler(request) File "/usr/local/lib/python3.5/dist-packages/pyramid_tm/__init__.py", line 119, in tm_tween reraise(*exc_info) File "/u...
TypeError
def deserialize(self, cstruct=colander.null): """Preprocess received data to carefully merge defaults.""" if cstruct is not colander.null: defaults = cstruct.get("defaults") requests = cstruct.get("requests") if isinstance(defaults, dict) and isinstance(requests, list): for r...
def deserialize(self, cstruct=colander.null): """Preprocess received data to carefully merge defaults.""" defaults = cstruct.get("defaults") requests = cstruct.get("requests") if isinstance(defaults, dict) and isinstance(requests, list): for request in requests: if isinstance(request...
https://github.com/Kinto/kinto/issues/1024
2017-01-18 16:45:58,968 ERROR [kinto.core.views.errors][waitress] "POST /v1/batch" ? (? ms) '_null' object has no attribute 'get' agent=HTTPie/0.9.2 authn_type=None errno=None exception=Traceback (most recent call last): File "/home/mathieu/Code/Mozilla/kinto/.venv/local/lib/python2.7/site-packages/pyramid/tweens.py",...
AttributeError
def _raise_304_if_not_modified(self, record=None): """Raise 304 if current timestamp is inferior to the one specified in headers. :raises: :exc:`~pyramid:pyramid.httpexceptions.HTTPNotModified` """ if_none_match = self.request.headers.get("If-None-Match") if not if_none_match: return ...
def _raise_304_if_not_modified(self, record=None): """Raise 304 if current timestamp is inferior to the one specified in headers. :raises: :exc:`~pyramid:pyramid.httpexceptions.HTTPNotModified` """ if_none_match = self.request.headers.get("If-None-Match") if not if_none_match: return ...
https://github.com/Kinto/kinto/issues/983
Traceback (most recent call last): File \"/data/kinto-dist/lib/python2.7/site-packages/pyramid/tweens.py\", line 22, in excview_tween response = handler(request) File \"/data/kinto-dist/lib/python2.7/site-packages/pyramid_tm/__init__.py\", line 119, in tm_tween reraise(*exc_info) File \"/data/kinto-dist/lib/python2.7/s...
UnicodeDecodeError
def _raise_412_if_modified(self, record=None): """Raise 412 if current timestamp is superior to the one specified in headers. :raises: :exc:`~pyramid:pyramid.httpexceptions.HTTPPreconditionFailed` """ if_match = self.request.headers.get("If-Match") if_none_match = self.request.headers.g...
def _raise_412_if_modified(self, record=None): """Raise 412 if current timestamp is superior to the one specified in headers. :raises: :exc:`~pyramid:pyramid.httpexceptions.HTTPPreconditionFailed` """ if_match = self.request.headers.get("If-Match") if_none_match = self.request.headers.g...
https://github.com/Kinto/kinto/issues/983
Traceback (most recent call last): File \"/data/kinto-dist/lib/python2.7/site-packages/pyramid/tweens.py\", line 22, in excview_tween response = handler(request) File \"/data/kinto-dist/lib/python2.7/site-packages/pyramid_tm/__init__.py\", line 119, in tm_tween reraise(*exc_info) File \"/data/kinto-dist/lib/python2.7/s...
UnicodeDecodeError
def _find_required_permission(self, request, service): """Find out what is the permission object id and the required permission. .. note:: This method saves an attribute ``self.current_record`` used in :class:`kinto.core.resource.UserResource`. """ # By default, it's a URI a and per...
def _find_required_permission(self, request, service): """Find out what is the permission object id and the required permission. .. note:: This method saves an attribute ``self.current_record`` used in :class:`kinto.core.resource.UserResource`. """ # By default, it's a URI a and per...
https://github.com/Kinto/kinto/issues/931
{"Pid":3109,"EnvVersion":"2.0","Hostname":"ip-172-31-2-114","Timestamp":1479738668906000000,"Fields":{"lang":null,"exception":"Traceback (most recent call last):\n File \"\/data\/kinto-dist\/lib\/python2.7\/site-packages\/pyramid\/tweens.py\", line 22, in excview_tween\n response = handler(request)\n File \"\/data...
nUnicodeEncodeError
def get_object_permissions(self, object_id, permissions=None): return self.get_objects_permissions([object_id], permissions)[0]
def get_object_permissions(self, object_id, permissions=None): perms = self.get_objects_permissions([object_id], permissions) return perms[0] if perms else {}
https://github.com/Kinto/kinto/issues/842
http --check-status --form POST http://localhost:8888/v1/buckets/source/collections/source/records/80ec9929-6896-4022-8443-3da4f5353f47/attachment attachment@kinto-logo.png --auth user:pass "POST /v1/buckets/source/collections/source/records/80ec9929-6896-4022-8443-3da4f5353f47/attachment" ? (? ms) u'/buckets/source/...
KeyError
def get_objects_permissions(self, objects_ids, permissions=None): query = """ WITH required_object_ids AS ( VALUES %(objects_ids)s ) SELECT object_id, permission, principal FROM required_object_ids JOIN access_control_entries ON (object_id = column2) ...
def get_objects_permissions(self, objects_ids, permissions=None): query = """ WITH required_object_ids AS ( VALUES %(objects_ids)s ) SELECT object_id, permission, principal FROM required_object_ids JOIN access_control_entries ON (object_id = column2) ...
https://github.com/Kinto/kinto/issues/842
http --check-status --form POST http://localhost:8888/v1/buckets/source/collections/source/records/80ec9929-6896-4022-8443-3da4f5353f47/attachment attachment@kinto-logo.png --auth user:pass "POST /v1/buckets/source/collections/source/records/80ec9929-6896-4022-8443-3da4f5353f47/attachment" ? (? ms) u'/buckets/source/...
KeyError
def ttl(self, key): ttl = self._ttl.get(self.prefix + key) if ttl is not None: return (ttl - msec_time()) / 1000.0 return -1
def ttl(self, key): ttl = self._ttl.get(self.prefix + key) if ttl is not None: return (ttl - utils.msec_time()) / 1000.0 return -1
https://github.com/Kinto/kinto/issues/759
2016-08-16 14:57:02,332 ERROR [kinto.core.views.errors][waitress] "POST /v1/buckets/e3e5dfdd-b5de-e9dd-e2ad-637fc2c6481f/collections/tickets/records" ? (? ms) dictionary changed size during iteration agent=None authn_type=basicauth collection_id=record collection_timestamp=1471359417323 errno=None exception=Traceback ...
RuntimeError
def expire(self, key, ttl): self._ttl[self.prefix + key] = msec_time() + int(ttl * 1000.0)
def expire(self, key, ttl): self._ttl[self.prefix + key] = utils.msec_time() + int(ttl * 1000.0)
https://github.com/Kinto/kinto/issues/759
2016-08-16 14:57:02,332 ERROR [kinto.core.views.errors][waitress] "POST /v1/buckets/e3e5dfdd-b5de-e9dd-e2ad-637fc2c6481f/collections/tickets/records" ? (? ms) dictionary changed size during iteration agent=None authn_type=basicauth collection_id=record collection_timestamp=1471359417323 errno=None exception=Traceback ...
RuntimeError
def get(self, key): current = msec_time() expired = [k for k, v in self._ttl.items() if current >= v] for expired_item_key in expired: self.delete(expired_item_key[len(self.prefix) :]) return self._store.get(self.prefix + key)
def get(self, key): current = utils.msec_time() expired = [k for k, v in self._ttl.items() if current >= v] for expired_item_key in expired: self.delete(expired_item_key[len(self.prefix) :]) return self._store.get(self.prefix + key)
https://github.com/Kinto/kinto/issues/759
2016-08-16 14:57:02,332 ERROR [kinto.core.views.errors][waitress] "POST /v1/buckets/e3e5dfdd-b5de-e9dd-e2ad-637fc2c6481f/collections/tickets/records" ? (? ms) dictionary changed size during iteration agent=None authn_type=basicauth collection_id=record collection_timestamp=1471359417323 errno=None exception=Traceback ...
RuntimeError
def on_resource_changed(event): """ Everytime an object is created/changed/deleted, we create an entry in the ``history`` resource. The entries are served as read-only in the :mod:`kinto.plugins.history.views` module. """ payload = event.payload resource_name = payload["resource_name"] e...
def on_resource_changed(event): """ Everytime an object is created/changed/deleted, we create an entry in the ``history`` resource. The entries are served as read-only in the :mod:`kinto.plugins.history.views` module. """ payload = copy.deepcopy(event.payload) resource_name = payload["resour...
https://github.com/Kinto/kinto/issues/773
ERROR "DELETE /v1/buckets" ? (? ms) 'bucket_id' agent=node-fetch/1.0 (+https://github.com/bitinn/node-fetch) authn_type=basicauth collection_id=bucket collection_timestamp=1471536086687 errno=None exception=Traceback (most recent call last): File "/home/mathieu/Code/Mozilla/kinto-client/.venv/local/lib/python2.7/site-...
KeyError
def view_lookup(request, uri): """ Look-up the specified `uri` and return the associated resource name along the match dict. :param request: the current request (used to obtain registry). :param uri: a plural or object endpoint URI. :rtype: tuple :returns: the resource name and the associat...
def view_lookup(request, uri): """ Look-up the specified `uri` and return the associated resource name along the match dict. :param request: the current request (used to obtain registry). :param uri: a plural or object endpoint URI. :rtype: tuple :returns: the resource name and the associat...
https://github.com/Kinto/kinto/issues/774
ERROR "GET /v1/permissions" ? (? ms) 'NoneType' object has no attribute 'name' agent=node-fetch/1.0 (+https://github.com/bitinn/node-fetch) authn_type=basicauth errno=None exception=Traceback (most recent call last): File "/home/mathieu/Code/Mozilla/kinto-client/.venv/local/lib/python2.7/site-packages/pyramid/tweens...
AttributeError
def permissions_get(request): # Invert the permissions inheritance tree. perms_descending_tree = {} for obtained, obtained_from in PERMISSIONS_INHERITANCE_TREE.items(): on_resource, obtained_perm = obtained.split(":", 1) for from_resource, perms in obtained_from.items(): for perm...
def permissions_get(request): # Invert the permissions inheritance tree. perms_descending_tree = {} for obtained, obtained_from in PERMISSIONS_INHERITANCE_TREE.items(): on_resource, obtained_perm = obtained.split(":", 1) for from_resource, perms in obtained_from.items(): for perm...
https://github.com/Kinto/kinto/issues/774
ERROR "GET /v1/permissions" ? (? ms) 'NoneType' object has no attribute 'name' agent=node-fetch/1.0 (+https://github.com/bitinn/node-fetch) authn_type=basicauth errno=None exception=Traceback (most recent call last): File "/home/mathieu/Code/Mozilla/kinto-client/.venv/local/lib/python2.7/site-packages/pyramid/tweens...
AttributeError
def _raise_400_if_invalid_id(self, record_id): """Raise 400 if specified record id does not match the format excepted by storage backends. :raises: :class:`pyramid.httpexceptions.HTTPBadRequest` """ is_string = isinstance(record_id, six.string_types) if not is_string or not self.model.id_genera...
def _raise_400_if_invalid_id(self, record_id): """Raise 400 if specified record id does not match the format excepted by storage backends. :raises: :class:`pyramid.httpexceptions.HTTPBadRequest` """ if not self.model.id_generator.match(six.text_type(record_id)): error_details = {"location":...
https://github.com/Kinto/kinto/issues/688
2016-06-21 13:41:49,701 DEBUG [kinto.core.storage.postgresql.pool.QueuePoolWithMaxBacklog][waitress] Connection <connection object at 0x7f1f396ad6e0; dsn: 'dbname=postgres user=postgres password=xxxxxxxx host=localhost', closed: 0> checked out from pool 2016-06-21 13:41:49,711 ERROR [kinto.core.storage.postgresql.clien...
BackendError
def includeme(config): settings = config.get_settings() # Heartbeat registry. config.registry.heartbeats = {} # Public settings registry. config.registry.public_settings = {"batch_max_requests", "readonly"} # Directive to declare arbitrary API capabilities. def add_api_capability(config, ...
def includeme(config): settings = config.get_settings() # Heartbeat registry. config.registry.heartbeats = {} # Public settings registry. config.registry.public_settings = {"batch_max_requests", "readonly"} # Setup cornice. config.include("cornice") # Per-request transaction. con...
https://github.com/Kinto/kinto/issues/628
kinto start event='Backend settings referring to cliquet are DEPRECATED. Please update your kinto.cache_backend setting to kinto.core.cache.memory (was: cliquet.cache.memory).' event='Backend settings referring to cliquet are DEPRECATED. Please update your kinto.permission_backend setting to kinto.core.permission.memor...
AttributeError
def get_hello(request): """Return information regarding the current instance.""" settings = request.registry.settings project_name = settings["project_name"] project_version = settings["project_version"] data = dict( project_name=project_name, project_version=project_version, ...
def get_hello(request): """Return information regarding the current instance.""" settings = request.registry.settings project_name = settings["project_name"] project_version = settings["project_version"] data = dict( project_name=project_name, project_version=project_version, ...
https://github.com/Kinto/kinto/issues/628
kinto start event='Backend settings referring to cliquet are DEPRECATED. Please update your kinto.cache_backend setting to kinto.core.cache.memory (was: cliquet.cache.memory).' event='Backend settings referring to cliquet are DEPRECATED. Please update your kinto.permission_backend setting to kinto.core.permission.memor...
AttributeError
def setup_listeners(config): # Register basic subscriber predicates, to filter events. config.add_subscriber_predicate("for_actions", EventActionFilter) config.add_subscriber_predicate("for_resources", EventResourceFilter) write_actions = (ACTIONS.CREATE, ACTIONS.UPDATE, ACTIONS.DELETE) settings = ...
def setup_listeners(config): # Register basic subscriber predicates, to filter events. config.add_subscriber_predicate("for_actions", EventActionFilter) config.add_subscriber_predicate("for_resources", EventResourceFilter) write_actions = (ACTIONS.CREATE, ACTIONS.UPDATE, ACTIONS.DELETE) settings = ...
https://github.com/Kinto/kinto/issues/515
web_1 | Traceback (most recent call last): web_1 | File "/usr/local/lib/python3.5/dist-packages/cliquet/initialization.py", line 399, in setup_listeners web_1 | listener = listener_mod.load_from_config(config, prefix) web_1 | AttributeError: module 'redis' has no attribute 'load_from_config'
AttributeError
def create_from_config(config, prefix=""): """Create a PostgreSQLClient client using settings in the provided config.""" if sqlalchemy is None: message = ( "PostgreSQL dependencies missing. " "Refer to installation section in documentation." ) raise ImportWarning(...
def create_from_config(config, prefix=""): """Create a PostgreSQLClient client using settings in the provided config.""" if sqlalchemy is None: message = ( "PostgreSQL dependencies missing. " "Refer to installation section in documentation." ) raise ImportWarning(...
https://github.com/Kinto/kinto/issues/515
web_1 | Traceback (most recent call last): web_1 | File "/usr/local/lib/python3.5/dist-packages/cliquet/initialization.py", line 399, in setup_listeners web_1 | listener = listener_mod.load_from_config(config, prefix) web_1 | AttributeError: module 'redis' has no attribute 'load_from_config'
AttributeError
def _format_conditions(self, filters, id_field, modified_field, prefix="filters"): """Format the filters list in SQL, with placeholders for safe escaping. .. note:: All conditions are combined using AND. .. note:: Field name and value are escaped as they come from HTTP API. :returns:...
def _format_conditions(self, filters, id_field, modified_field, prefix="filters"): """Format the filters list in SQL, with placeholders for safe escaping. .. note:: All conditions are combined using AND. .. note:: Field name and value are escaped as they come from HTTP API. :returns:...
https://github.com/Kinto/kinto/issues/587
{"Pid":4280,"EnvVersion":"2.0","Hostname":"ip-172-31-4-126","Timestamp":1462794460764000000,"Fields":{"lang":null,"exception":"Traceback (most recent call last): File \"\/data\/kinto-dist\/lib\/python2.7\/site-packages\/pyramid\/tweens.py\", line 20, in excview_tween response = handler(request) File \"\/data\/kinto-dis...
BackendError
def _extract_filters(self, queryparams=None): """Extracts filters from QueryString parameters.""" if not queryparams: queryparams = self.request.GET filters = [] for param, paramvalue in queryparams.items(): param = param.strip() error_details = { "name": param, ...
def _extract_filters(self, queryparams=None): """Extracts filters from QueryString parameters.""" if not queryparams: queryparams = self.request.GET filters = [] for param, paramvalue in queryparams.items(): param = param.strip() # Ignore specific fields if param.start...
https://github.com/Kinto/kinto/issues/587
{"Pid":4280,"EnvVersion":"2.0","Hostname":"ip-172-31-4-126","Timestamp":1462794460764000000,"Fields":{"lang":null,"exception":"Traceback (most recent call last): File \"\/data\/kinto-dist\/lib\/python2.7\/site-packages\/pyramid\/tweens.py\", line 20, in excview_tween response = handler(request) File \"\/data\/kinto-dis...
BackendError
def __init__(self, request): # Make it available for the authorization policy. self.prefixed_userid = getattr(request, "prefixed_userid", None) self._check_permission = request.registry.permission.check_permission # Partial collections of ProtectedResource: self.shared_ids = [] # Store servic...
def __init__(self, request): # Make it available for the authorization policy. self.prefixed_userid = getattr(request, "prefixed_userid", None) self._check_permission = request.registry.permission.check_permission # Partial collections of ProtectedResource: self.shared_ids = [] # Store servic...
https://github.com/Kinto/kinto/issues/452
2016-02-22 15:21:36,730 ERROR [venusian][waitress] "POST /v1/buckets/default/collections/test-collection-2aa00fc8-b6e2-41d2-a6a5-28d23ca6fce5/records" ? (? ms) 'str' object does not support item assignment lang=None; exception=Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/pyramid/twee...
TypeError
def _get_record_or_404(self, record_id): """Retrieve record from storage and raise ``404 Not found`` if missing. :raises: :exc:`~pyramid:pyramid.httpexceptions.HTTPNotFound` if the record is not found. """ if self.context and self.context.current_record: # Set during authorization. Save...
def _get_record_or_404(self, record_id): """Retrieve record from storage and raise ``404 Not found`` if missing. :raises: :exc:`~pyramid:pyramid.httpexceptions.HTTPNotFound` if the record is not found. """ try: return self.collection.get_record(record_id) except storage_exceptions.R...
https://github.com/Kinto/kinto/issues/452
2016-02-22 15:21:36,730 ERROR [venusian][waitress] "POST /v1/buckets/default/collections/test-collection-2aa00fc8-b6e2-41d2-a6a5-28d23ca6fce5/records" ? (? ms) 'str' object does not support item assignment lang=None; exception=Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/pyramid/twee...
TypeError
def render_template(template, destination, **kwargs): template = os.path.join(HERE, template) folder = os.path.dirname(destination) os.makedirs(folder) with codecs.open(template, "r", encoding="utf-8") as f: raw_template = f.read() rendered = raw_template.format(**kwargs) with ...
def render_template(template, destination, **kwargs): template = os.path.join(HERE, template) with codecs.open(template, "r", encoding="utf-8") as f: raw_template = f.read() rendered = raw_template.format(**kwargs) with codecs.open(destination, "w+", encoding="utf-8") as output: ...
https://github.com/Kinto/kinto/issues/302
kinto init Which backend to use? (1 - postgresql, 2 - redis, default - memory) Traceback (most recent call last): File "/var/www/kinto.leplat.re/venv/bin/kinto", line 9, in <module> load_entry_point('kinto==1.9.0', 'console_scripts', 'kinto')() File "/var/www/kinto.leplat.re/venv/local/lib/python2.7/site-packages/kinto...
IOError
def __init__(self, file, fs=None): """Initialise the FSFile instance. Args: file (str, Pathlike, or OpenFile): String, object implementing the `os.PathLike` protocol, or an `fsspec.OpenFile` instance. If passed an instance of `fsspec.OpenFile`, the following argumen...
def __init__(self, file, fs=None): """Initialise the FSFile instance. *file* can be string or an fsspec.OpenFile instance. In the latter case, the follow argument *fs* has no effect. *fs* can be None or a fsspec filesystem instance. """ try: self._file = file.path self._fs = file.fs...
https://github.com/pytroll/satpy/issues/1516
Traceback (most recent call last): File "mwe/mwe002.py", line 5, in <module> print(str(fsf)) TypeError: __str__ returned non-string (type PosixPath)
TypeError
def __str__(self): """Return the string version of the filename.""" return os.fspath(self._file)
def __str__(self): """Return the string version of the filename.""" return self._file
https://github.com/pytroll/satpy/issues/1516
Traceback (most recent call last): File "mwe/mwe002.py", line 5, in <module> print(str(fsf)) TypeError: __str__ returned non-string (type PosixPath)
TypeError
def __fspath__(self): """Comply with PathLike.""" return os.fspath(self._file)
def __fspath__(self): """Comply with PathLike.""" return self._file
https://github.com/pytroll/satpy/issues/1516
Traceback (most recent call last): File "mwe/mwe002.py", line 5, in <module> print(str(fsf)) TypeError: __str__ returned non-string (type PosixPath)
TypeError
def __init__(self, filename, filename_info, filetype_info): """Initialize object information by reading the input file.""" super(AVHRRAAPPL1BFile, self).__init__(filename, filename_info, filetype_info) self.channels = {i: None for i in AVHRR_CHANNEL_NAMES} self.units = {i: "counts" for i in AVHRR_CHANNE...
def __init__(self, filename, filename_info, filetype_info): """Initialize object information by reading the input file.""" super(AVHRRAAPPL1BFile, self).__init__(filename, filename_info, filetype_info) self.channels = {i: None for i in AVHRR_CHANNEL_NAMES} self.units = {i: "counts" for i in AVHRR_CHANNE...
https://github.com/pytroll/satpy/issues/1330
Traceback (most recent call last): File "/home/a001673/usr/src/satpy/satpy/readers/yaml_reader.py", line 785, in _load_dataset_with_area ds = self._load_dataset_data(file_handlers, dsid, **kwargs) File "/home/a001673/usr/src/satpy/satpy/readers/yaml_reader.py", line 668, in _load_dataset_data proj = self._load_dataset(...
ValueError
def get_dataset(self, key, info): """Get a dataset from the file.""" if key["name"] in CHANNEL_NAMES: if self.active_channels[key["name"]]: dataset = self.calibrate(key) else: return None elif key["name"] in ["longitude", "latitude"]: dataset = self.navigate(k...
def get_dataset(self, key, info): """Get a dataset from the file.""" if key["name"] in CHANNEL_NAMES: dataset = self.calibrate(key) elif key["name"] in ["longitude", "latitude"]: if self.lons is None or self.lats is None: self.navigate() if key["name"] == "longitude": ...
https://github.com/pytroll/satpy/issues/1330
Traceback (most recent call last): File "/home/a001673/usr/src/satpy/satpy/readers/yaml_reader.py", line 785, in _load_dataset_with_area ds = self._load_dataset_data(file_handlers, dsid, **kwargs) File "/home/a001673/usr/src/satpy/satpy/readers/yaml_reader.py", line 668, in _load_dataset_data proj = self._load_dataset(...
ValueError
def get_angles(self, angle_id): """Get sun-satellite viewing angles.""" sunz, satz, azidiff = self._get_all_interpolated_angles() name_to_variable = dict(zip(ANGLES, (satz, sunz, azidiff))) return create_xarray(name_to_variable[angle_id])
def get_angles(self, angle_id): """Get sun-satellite viewing angles.""" sunz40km = self._data["ang"][:, :, 0] * 1e-2 satz40km = self._data["ang"][:, :, 1] * 1e-2 azidiff40km = self._data["ang"][:, :, 2] * 1e-2 try: from geotiepoints.interpolator import Interpolator except ImportError: ...
https://github.com/pytroll/satpy/issues/1330
Traceback (most recent call last): File "/home/a001673/usr/src/satpy/satpy/readers/yaml_reader.py", line 785, in _load_dataset_with_area ds = self._load_dataset_data(file_handlers, dsid, **kwargs) File "/home/a001673/usr/src/satpy/satpy/readers/yaml_reader.py", line 668, in _load_dataset_data proj = self._load_dataset(...
ValueError
def navigate(self, coordinate_id): """Get the longitudes and latitudes of the scene.""" lons, lats = self._get_all_interpolated_coordinates() if coordinate_id == "longitude": return create_xarray(lons) elif coordinate_id == "latitude": return create_xarray(lats) else: raise K...
def navigate(self): """Get the longitudes and latitudes of the scene.""" lons40km = self._data["pos"][:, :, 1] * 1e-4 lats40km = self._data["pos"][:, :, 0] * 1e-4 try: from geotiepoints import SatelliteInterpolator except ImportError: logger.warning("Could not interpolate lon/lats, ...
https://github.com/pytroll/satpy/issues/1330
Traceback (most recent call last): File "/home/a001673/usr/src/satpy/satpy/readers/yaml_reader.py", line 785, in _load_dataset_with_area ds = self._load_dataset_data(file_handlers, dsid, **kwargs) File "/home/a001673/usr/src/satpy/satpy/readers/yaml_reader.py", line 668, in _load_dataset_data proj = self._load_dataset(...
ValueError
def calibrate(self, dataset_id, pre_launch_coeffs=False, calib_coeffs=None): """Calibrate the data.""" if calib_coeffs is None: calib_coeffs = {} units = { "reflectance": "%", "brightness_temperature": "K", "counts": "", "radiance": "W*m-2*sr-1*cm ?", } if d...
def calibrate(self, dataset_id, pre_launch_coeffs=False, calib_coeffs=None): """Calibrate the data.""" if calib_coeffs is None: calib_coeffs = {} units = { "reflectance": "%", "brightness_temperature": "K", "counts": "", "radiance": "W*m-2*sr-1*cm ?", } if d...
https://github.com/pytroll/satpy/issues/1330
Traceback (most recent call last): File "/home/a001673/usr/src/satpy/satpy/readers/yaml_reader.py", line 785, in _load_dataset_with_area ds = self._load_dataset_data(file_handlers, dsid, **kwargs) File "/home/a001673/usr/src/satpy/satpy/readers/yaml_reader.py", line 668, in _load_dataset_data proj = self._load_dataset(...
ValueError
def configs_for_reader(reader=None, ppp_config_dir=None): """Generate reader configuration files for one or more readers. Args: reader (Optional[str]): Yield configs only for this reader ppp_config_dir (Optional[str]): Additional configuration directory to search for reader configur...
def configs_for_reader(reader=None, ppp_config_dir=None): """Generate reader configuration files for one or more readers. Args: reader (Optional[str]): Yield configs only for this reader ppp_config_dir (Optional[str]): Additional configuration directory to search for reader configur...
https://github.com/pytroll/satpy/issues/1201
Traceback (most recent call last): File "mwe46.py", line 8, in <module> sc = Scene(filenames={reader_sev: fn_sev, reader_nok: fn_nok}) File "/data/gholl/miniconda3/envs/py38/lib/python3.8/site-packages/satpy/scene.py", line 149, in __init__ self.readers = self.create_reader_instances(filenames=filenames, File "/data/gh...
ValueError
def _slice_area_from_bbox(self, src_area, dst_area, ll_bbox=None, xy_bbox=None): """Slice the provided area using the bounds provided.""" if ll_bbox is not None: dst_area = AreaDefinition( "crop_area", "crop_area", "crop_latlong", {"proj": "latlong"}, ...
def _slice_area_from_bbox(self, src_area, dst_area, ll_bbox=None, xy_bbox=None): """Slice the provided area using the bounds provided.""" if ll_bbox is not None: dst_area = AreaDefinition( "crop_area", "crop_area", "crop_latlong", {"proj": "latlong"}, ...
https://github.com/pytroll/satpy/issues/1124
[DEBUG: 2020-03-29 12:19:40 : fiona.env] Entering env context: <fiona.env.Env object at 0x000002426A002708> [DEBUG: 2020-03-29 12:19:40 : fiona.env] Starting outermost env [DEBUG: 2020-03-29 12:19:40 : fiona.env] No GDAL environment exists [DEBUG: 2020-03-29 12:19:40 : fiona.env] New GDAL environment <fiona._env.GDALEn...
NotImplementedError
def __init__(self, filename, filename_info, filetype_info): """Initialize FileHandler.""" super(EPSAVHRRFile, self).__init__(filename, filename_info, filetype_info) self.lons, self.lats = None, None self.sun_azi, self.sun_zen, self.sat_azi, self.sat_zen = None, None, None, None self.area = None ...
def __init__(self, filename, filename_info, filetype_info): """Initialize FileHandler.""" super(EPSAVHRRFile, self).__init__(filename, filename_info, filetype_info) self.lons, self.lats = None, None self.sun_azi, self.sun_zen, self.sat_azi, self.sat_zen = None, None, None, None self.area = None ...
https://github.com/pytroll/satpy/issues/924
[DEBUG: 2019-10-08 10:34:09 : satpy.readers.eps_l1b] Reading /data/pytroll/testdata/eps-l1b/avhrr_metop02_20191008055203_20191008062503.eps [ERROR: 2019-10-08 10:34:13 : satpy.readers.yaml_reader] Could not load dataset 'DatasetID(name='longitude', wavelength=None, resolution=1050, polarization=None, calibration=None, ...
ValueError
def _read_all(self): logger.debug("Reading %s", self.filename) self.sections, self.form = read_records(self.filename) self.scanlines = self["TOTAL_MDR"] if self.scanlines != len(self.sections[("mdr", 2)]): logger.warning( "Number of declared records doesn't match number of scanlines ...
def _read_all(self, filename): LOG.debug("Reading %s", filename) self.records, self.form = read_raw(filename) self.mdrs = [ record for record in self.records if record_class[record["record_class"]] == "mdr" ] self.iprs = [ record for record in self.records ...
https://github.com/pytroll/satpy/issues/924
[DEBUG: 2019-10-08 10:34:09 : satpy.readers.eps_l1b] Reading /data/pytroll/testdata/eps-l1b/avhrr_metop02_20191008055203_20191008062503.eps [ERROR: 2019-10-08 10:34:13 : satpy.readers.yaml_reader] Could not load dataset 'DatasetID(name='longitude', wavelength=None, resolution=1050, polarization=None, calibration=None, ...
ValueError
def __getitem__(self, key): """Get value for given key.""" for altkey in self.form.scales.keys(): try: try: return self.sections[altkey][key] * self.form.scales[altkey][key] except TypeError: val = self.sections[altkey][key].item().decode().split("...
def __getitem__(self, key): """Get value for given key.""" for altkey in self.form.scales.keys(): try: try: return ( da.from_array(self.sections[altkey][key], chunks=CHUNK_SIZE) * self.form.scales[altkey][key] ) ...
https://github.com/pytroll/satpy/issues/924
[DEBUG: 2019-10-08 10:34:09 : satpy.readers.eps_l1b] Reading /data/pytroll/testdata/eps-l1b/avhrr_metop02_20191008055203_20191008062503.eps [ERROR: 2019-10-08 10:34:13 : satpy.readers.yaml_reader] Could not load dataset 'DatasetID(name='longitude', wavelength=None, resolution=1050, polarization=None, calibration=None, ...
ValueError
def _get_full_lonlats(self, lons, lats): nav_sample_rate = self["NAV_SAMPLE_RATE"] if nav_sample_rate == 20 and self.pixels == 2048: from geotiepoints import metop20kmto1km return metop20kmto1km(lons, lats) else: raise NotImplementedError( "Lon/lat expansion not implemen...
def _get_full_lonlats(self): lats = np.hstack( ( self["EARTH_LOCATION_FIRST"][:, [0]], self["EARTH_LOCATIONS"][:, :, 0], self["EARTH_LOCATION_LAST"][:, [0]], ) ) lons = np.hstack( ( self["EARTH_LOCATION_FIRST"][:, [1]], sel...
https://github.com/pytroll/satpy/issues/924
[DEBUG: 2019-10-08 10:34:09 : satpy.readers.eps_l1b] Reading /data/pytroll/testdata/eps-l1b/avhrr_metop02_20191008055203_20191008062503.eps [ERROR: 2019-10-08 10:34:13 : satpy.readers.yaml_reader] Could not load dataset 'DatasetID(name='longitude', wavelength=None, resolution=1050, polarization=None, calibration=None, ...
ValueError
def get_full_lonlats(self): """Get the interpolated lons/lats.""" if self.lons is not None and self.lats is not None: return self.lons, self.lats raw_lats = np.hstack( ( self["EARTH_LOCATION_FIRST"][:, [0]], self["EARTH_LOCATIONS"][:, :, 0], self["EARTH_L...
def get_full_lonlats(self): """Get the interpolated lons/lats.""" if self.lons is not None and self.lats is not None: return self.lons, self.lats self.lons, self.lats = self._get_full_lonlats() self.lons = da.from_delayed( self.lons, dtype=self["EARTH_LOCATIONS"].dtype, ...
https://github.com/pytroll/satpy/issues/924
[DEBUG: 2019-10-08 10:34:09 : satpy.readers.eps_l1b] Reading /data/pytroll/testdata/eps-l1b/avhrr_metop02_20191008055203_20191008062503.eps [ERROR: 2019-10-08 10:34:13 : satpy.readers.yaml_reader] Could not load dataset 'DatasetID(name='longitude', wavelength=None, resolution=1050, polarization=None, calibration=None, ...
ValueError
def _get_full_angles(self, solar_zenith, sat_zenith, solar_azimuth, sat_azimuth): nav_sample_rate = self["NAV_SAMPLE_RATE"] if nav_sample_rate == 20 and self.pixels == 2048: from geotiepoints import metop20kmto1km # Note: interpolation asumes lat values values between -90 and 90 # Solar...
def _get_full_angles(self): solar_zenith = np.hstack( ( self["ANGULAR_RELATIONS_FIRST"][:, [0]], self["ANGULAR_RELATIONS"][:, :, 0], self["ANGULAR_RELATIONS_LAST"][:, [0]], ) ) sat_zenith = np.hstack( ( self["ANGULAR_RELATIONS_FIRST"][...
https://github.com/pytroll/satpy/issues/924
[DEBUG: 2019-10-08 10:34:09 : satpy.readers.eps_l1b] Reading /data/pytroll/testdata/eps-l1b/avhrr_metop02_20191008055203_20191008062503.eps [ERROR: 2019-10-08 10:34:13 : satpy.readers.yaml_reader] Could not load dataset 'DatasetID(name='longitude', wavelength=None, resolution=1050, polarization=None, calibration=None, ...
ValueError
def get_full_angles(self): """Get the interpolated lons/lats.""" if ( self.sun_azi is not None and self.sun_zen is not None and self.sat_azi is not None and self.sat_zen is not None ): return self.sun_azi, self.sun_zen, self.sat_azi, self.sat_zen solar_zenith = n...
def get_full_angles(self): """Get the interpolated lons/lats.""" if ( self.sun_azi is not None and self.sun_zen is not None and self.sat_azi is not None and self.sat_zen is not None ): return self.sun_azi, self.sun_zen, self.sat_azi, self.sat_zen self.sun_azi, se...
https://github.com/pytroll/satpy/issues/924
[DEBUG: 2019-10-08 10:34:09 : satpy.readers.eps_l1b] Reading /data/pytroll/testdata/eps-l1b/avhrr_metop02_20191008055203_20191008062503.eps [ERROR: 2019-10-08 10:34:13 : satpy.readers.yaml_reader] Could not load dataset 'DatasetID(name='longitude', wavelength=None, resolution=1050, polarization=None, calibration=None, ...
ValueError
def get_bounding_box(self): """Get bounding box.""" if self.sections is None: self._read_all() lats = np.hstack( [ self["EARTH_LOCATION_FIRST"][0, [0]], self["EARTH_LOCATION_LAST"][0, [0]], self["EARTH_LOCATION_LAST"][-1, [0]], self["EARTH_LOCA...
def get_bounding_box(self): """Get bounding box.""" if self.mdrs is None: self._read_all(self.filename) lats = np.hstack( [ self["EARTH_LOCATION_FIRST"][0, [0]], self["EARTH_LOCATION_LAST"][0, [0]], self["EARTH_LOCATION_LAST"][-1, [0]], self["E...
https://github.com/pytroll/satpy/issues/924
[DEBUG: 2019-10-08 10:34:09 : satpy.readers.eps_l1b] Reading /data/pytroll/testdata/eps-l1b/avhrr_metop02_20191008055203_20191008062503.eps [ERROR: 2019-10-08 10:34:13 : satpy.readers.yaml_reader] Could not load dataset 'DatasetID(name='longitude', wavelength=None, resolution=1050, polarization=None, calibration=None, ...
ValueError
def get_dataset(self, key, info): """Get calibrated channel data.""" if self.sections is None: self._read_all() if key.name in ["longitude", "latitude"]: lons, lats = self.get_full_lonlats() if key.name == "longitude": dataset = create_xarray(lons) else: ...
def get_dataset(self, key, info): """Get calibrated channel data.""" if self.mdrs is None: self._read_all(self.filename) if key.name in ["longitude", "latitude"]: lons, lats = self.get_full_lonlats() if key.name == "longitude": dataset = create_xarray(lons) else:...
https://github.com/pytroll/satpy/issues/924
[DEBUG: 2019-10-08 10:34:09 : satpy.readers.eps_l1b] Reading /data/pytroll/testdata/eps-l1b/avhrr_metop02_20191008055203_20191008062503.eps [ERROR: 2019-10-08 10:34:13 : satpy.readers.yaml_reader] Could not load dataset 'DatasetID(name='longitude', wavelength=None, resolution=1050, polarization=None, calibration=None, ...
ValueError
def process_array(elt, ascii=False): """Process an 'array' tag.""" del ascii chld = list(elt) if len(chld) > 1: raise ValueError() chld = chld[0] try: name, current_type, scale = CASES[chld.tag](chld) size = None except ValueError: name, current_type, size, sc...
def process_array(elt, ascii=False): """Process an 'array' tag.""" del ascii chld = elt.getchildren() if len(chld) > 1: raise ValueError() chld = chld[0] try: name, current_type, scale = CASES[chld.tag](chld) size = None except ValueError: name, current_type, ...
https://github.com/pytroll/satpy/issues/924
[DEBUG: 2019-10-08 10:34:09 : satpy.readers.eps_l1b] Reading /data/pytroll/testdata/eps-l1b/avhrr_metop02_20191008055203_20191008062503.eps [ERROR: 2019-10-08 10:34:13 : satpy.readers.yaml_reader] Could not load dataset 'DatasetID(name='longitude', wavelength=None, resolution=1050, polarization=None, calibration=None, ...
ValueError
def parse_format(xml_file): """Parse the xml file to create types, scaling factor types, and scales.""" tree = ElementTree() tree.parse(xml_file) for param in tree.find("parameters"): VARIABLES[param.get("name")] = param.get("value") types_scales = {} for prod in tree.find("product"): ...
def parse_format(xml_file): """Parse the xml file to create types, scaling factor types, and scales.""" tree = ElementTree() tree.parse(xml_file) for param in tree.find("parameters").getchildren(): VARIABLES[param.get("name")] = param.get("value") types_scales = {} for prod in tree.fi...
https://github.com/pytroll/satpy/issues/924
[DEBUG: 2019-10-08 10:34:09 : satpy.readers.eps_l1b] Reading /data/pytroll/testdata/eps-l1b/avhrr_metop02_20191008055203_20191008062503.eps [ERROR: 2019-10-08 10:34:13 : satpy.readers.yaml_reader] Could not load dataset 'DatasetID(name='longitude', wavelength=None, resolution=1050, polarization=None, calibration=None, ...
ValueError
def __init__(self, filename): """Init the format reader.""" self.types, self.stypes, self.scales = parse_format(filename) self.translator = {} for key, val in self.types.items(): self.translator[val] = (self.scales[key], self.stypes[key])
def __init__(self, filename): self.types, self.stypes, self.scales = parse_format(filename) self.translator = {} for key, val in self.types.items(): self.translator[val] = (self.scales[key], self.stypes[key])
https://github.com/pytroll/satpy/issues/924
[DEBUG: 2019-10-08 10:34:09 : satpy.readers.eps_l1b] Reading /data/pytroll/testdata/eps-l1b/avhrr_metop02_20191008055203_20191008062503.eps [ERROR: 2019-10-08 10:34:13 : satpy.readers.yaml_reader] Could not load dataset 'DatasetID(name='longitude', wavelength=None, resolution=1050, polarization=None, calibration=None, ...
ValueError
def __init__(self, filename, filename_info, filetype_info, engine=None): """Init the olci reader base.""" super(NCOLCIBase, self).__init__(filename, filename_info, filetype_info) self.nc = xr.open_dataset( self.filename, decode_cf=True, mask_and_scale=True, engine=engine, ...
def __init__(self, filename, filename_info, filetype_info): """Init the olci reader base.""" super(NCOLCIBase, self).__init__(filename, filename_info, filetype_info) self.nc = xr.open_dataset( self.filename, decode_cf=True, mask_and_scale=True, engine="h5netcdf", chun...
https://github.com/pytroll/satpy/issues/944
Traceback (most recent call last): File "/network/aopp/apres/users/proud/satpyconda/lib/python3.7/site-packages/xarray/backends/file_manager.py", line 243, in __del__ File "/network/aopp/apres/users/proud/satpyconda/lib/python3.7/site-packages/xarray/backends/file_manager.py", line 221, in close File "/network/aopp/apr...
ImportError
def __init__(self, filename, filename_info, filetype_info, engine=None): """Init the file handler.""" super(NCOLCIChannelBase, self).__init__(filename, filename_info, filetype_info) self.channel = filename_info.get("dataset_name")
def __init__(self, filename, filename_info, filetype_info): """Init the file handler.""" super(NCOLCIChannelBase, self).__init__(filename, filename_info, filetype_info) self.channel = filename_info.get("dataset_name")
https://github.com/pytroll/satpy/issues/944
Traceback (most recent call last): File "/network/aopp/apres/users/proud/satpyconda/lib/python3.7/site-packages/xarray/backends/file_manager.py", line 243, in __del__ File "/network/aopp/apres/users/proud/satpyconda/lib/python3.7/site-packages/xarray/backends/file_manager.py", line 221, in close File "/network/aopp/apr...
ImportError
def __init__(self, filename, filename_info, filetype_info, cal, engine=None): """Init the file handler.""" super(NCOLCI1B, self).__init__(filename, filename_info, filetype_info) self.cal = cal.nc
def __init__(self, filename, filename_info, filetype_info, cal): """Init the file handler.""" super(NCOLCI1B, self).__init__(filename, filename_info, filetype_info) self.cal = cal.nc
https://github.com/pytroll/satpy/issues/944
Traceback (most recent call last): File "/network/aopp/apres/users/proud/satpyconda/lib/python3.7/site-packages/xarray/backends/file_manager.py", line 243, in __del__ File "/network/aopp/apres/users/proud/satpyconda/lib/python3.7/site-packages/xarray/backends/file_manager.py", line 221, in close File "/network/aopp/apr...
ImportError
def __init__(self, filename, filename_info, filetype_info, engine=None): """Init the file handler.""" super(NCOLCIAngles, self).__init__(filename, filename_info, filetype_info) self.nc = None # TODO: get metadata from the manifest file (xfdumanifest.xml) self.platform_name = PLATFORM_NAMES[filename_...
def __init__(self, filename, filename_info, filetype_info): """Init the file handler.""" super(NCOLCIAngles, self).__init__(filename, filename_info, filetype_info) self.nc = None # TODO: get metadata from the manifest file (xfdumanifest.xml) self.platform_name = PLATFORM_NAMES[filename_info["mission...
https://github.com/pytroll/satpy/issues/944
Traceback (most recent call last): File "/network/aopp/apres/users/proud/satpyconda/lib/python3.7/site-packages/xarray/backends/file_manager.py", line 243, in __del__ File "/network/aopp/apres/users/proud/satpyconda/lib/python3.7/site-packages/xarray/backends/file_manager.py", line 221, in close File "/network/aopp/apr...
ImportError
def get_dataset(self, key, info): """Load a dataset.""" if key.name not in self.datasets: return if self.nc is None: self.nc = xr.open_dataset( self.filename, decode_cf=True, mask_and_scale=True, engine=self.engine, chunks={"tie_co...
def get_dataset(self, key, info): """Load a dataset.""" if key.name not in self.datasets: return if self.nc is None: self.nc = xr.open_dataset( self.filename, decode_cf=True, mask_and_scale=True, engine="h5netcdf", chunks={"tie_col...
https://github.com/pytroll/satpy/issues/944
Traceback (most recent call last): File "/network/aopp/apres/users/proud/satpyconda/lib/python3.7/site-packages/xarray/backends/file_manager.py", line 243, in __del__ File "/network/aopp/apres/users/proud/satpyconda/lib/python3.7/site-packages/xarray/backends/file_manager.py", line 221, in close File "/network/aopp/apr...
ImportError
def precompute( self, mask=None, radius_of_influence=None, epsilon=0, cache_dir=None, **kwargs ): """Create a KDTree structure and store it for later use. Note: The `mask` keyword should be provided if geolocation may be valid where data points are invalid. """ from pyresample.kd_tree import X...
def precompute( self, mask=None, radius_of_influence=None, epsilon=0, cache_dir=None, **kwargs ): """Create a KDTree structure and store it for later use. Note: The `mask` keyword should be provided if geolocation may be valid where data points are invalid. """ del kwargs source_geo_def = ...
https://github.com/pytroll/satpy/issues/918
Traceback (most recent call last): File "<string>", line 1, in <module> File "/media/nas/x21324/miniconda3/envs/py37_sandbox/lib/python3.7/site-packages/satpy/__init__.py", line 53, in <module> from satpy.writers import available_writers # noqa File "/media/nas/x21324/miniconda3/envs/py37_sandbox/lib/python3.7/site-pa...
ImportError
def precompute( self, mask=None, radius_of_influence=50000, epsilon=0, reduce_data=True, cache_dir=False, **kwargs, ): """Create bilinear coefficients and store them for later use.""" from pyresample.bilinear.xarr import XArrayResamplerBilinear del kwargs del mask if se...
def precompute( self, mask=None, radius_of_influence=50000, epsilon=0, reduce_data=True, cache_dir=False, **kwargs, ): """Create bilinear coefficients and store them for later use.""" del kwargs del mask if self.resampler is None: kwargs = dict( source_ge...
https://github.com/pytroll/satpy/issues/918
Traceback (most recent call last): File "<string>", line 1, in <module> File "/media/nas/x21324/miniconda3/envs/py37_sandbox/lib/python3.7/site-packages/satpy/__init__.py", line 53, in <module> from satpy.writers import available_writers # noqa File "/media/nas/x21324/miniconda3/envs/py37_sandbox/lib/python3.7/site-pa...
ImportError
def __init__(self, source_geo_def, target_geo_def): """Initialize bucket resampler.""" super(BucketResamplerBase, self).__init__(source_geo_def, target_geo_def) self.resampler = None
def __init__(self, source_geo_def, target_geo_def): super(BucketResamplerBase, self).__init__(source_geo_def, target_geo_def) self.resampler = None
https://github.com/pytroll/satpy/issues/918
Traceback (most recent call last): File "<string>", line 1, in <module> File "/media/nas/x21324/miniconda3/envs/py37_sandbox/lib/python3.7/site-packages/satpy/__init__.py", line 53, in <module> from satpy.writers import available_writers # noqa File "/media/nas/x21324/miniconda3/envs/py37_sandbox/lib/python3.7/site-pa...
ImportError
def precompute(self, **kwargs): """Create X and Y indices and store them for later use.""" from pyresample import bucket LOG.debug("Initializing bucket resampler.") source_lons, source_lats = self.source_geo_def.get_lonlats(chunks=CHUNK_SIZE) self.resampler = bucket.BucketResampler( self.ta...
def precompute(self, **kwargs): """Create X and Y indices and store them for later use.""" LOG.debug("Initializing bucket resampler.") source_lons, source_lats = self.source_geo_def.get_lonlats(chunks=CHUNK_SIZE) self.resampler = bucket.BucketResampler( self.target_geo_def, source_lons, source_l...
https://github.com/pytroll/satpy/issues/918
Traceback (most recent call last): File "<string>", line 1, in <module> File "/media/nas/x21324/miniconda3/envs/py37_sandbox/lib/python3.7/site-packages/satpy/__init__.py", line 53, in <module> from satpy.writers import available_writers # noqa File "/media/nas/x21324/miniconda3/envs/py37_sandbox/lib/python3.7/site-pa...
ImportError
def compute(self, data, **kwargs): """Call the resampling.""" LOG.debug("Resampling %s", str(data.name)) results = [] if data.ndim == 3: for _i in range(data.shape[0]): res = self.resampler.get_count() results.append(res) else: res = self.resampler.get_count()...
def compute(self, data, **kwargs): """Call the resampling.""" LOG.debug("Resampling %s", str(data.name)) results = [] if data.ndim == 3: for i in range(data.shape[0]): res = self.resampler.get_count() results.append(res) else: res = self.resampler.get_count() ...
https://github.com/pytroll/satpy/issues/918
Traceback (most recent call last): File "<string>", line 1, in <module> File "/media/nas/x21324/miniconda3/envs/py37_sandbox/lib/python3.7/site-packages/satpy/__init__.py", line 53, in <module> from satpy.writers import available_writers # noqa File "/media/nas/x21324/miniconda3/envs/py37_sandbox/lib/python3.7/site-pa...
ImportError
def __call__(self, *args, **kwargs): """Call the compositor.""" from satpy import Scene # Check if filename exists, if not then try from SATPY_ANCPATH if not os.path.isfile(self.filename): tmp_filename = os.path.join(get_environ_ancpath(), self.filename) if os.path.isfile(tmp_filename):...
def __call__(self, *args, **kwargs): """Call the compositor.""" from satpy import Scene # Check if filename exists, if not then try from SATPY_ANCPATH if not os.path.isfile(self.filename): tmp_filename = os.path.join(get_environ_ancpath(), self.filename) if os.path.isfile(tmp_filename):...
https://github.com/pytroll/satpy/issues/830
[DEBUG: 2019-06-26 09:01:32 : satpy.readers.yaml_reader] No coordinates found for DatasetID(name='image', wavelength=None, resolution=None, polarization=None, calibration=None, level=None, modifiers=()) [DEBUG: 2019-06-26 09:01:32 : satpy.readers.generic_image] Reading DatasetID(name='image', wavelength=None, resolutio...
AttributeError
def add_overlay( orig, area, coast_dir, color=(0, 0, 0), width=0.5, resolution=None, level_coast=1, level_borders=1, fill_value=None, ): """Add coastline and political borders to image. Uses ``color`` for feature colors where ``color`` is a 3-element tuple of integers be...
def add_overlay( orig, area, coast_dir, color=(0, 0, 0), width=0.5, resolution=None, level_coast=1, level_borders=1, fill_value=None, ): """Add coastline and political borders to image, using *color* (tuple of integers between 0 and 255). Warning: Loses the masks ! *r...
https://github.com/pytroll/satpy/issues/449
[INFO: 2018-10-08 23:46:08 : satpy.writers] Add coastlines and political borders to image. [DEBUG: 2018-10-08 23:46:08 : satpy.writers] Automagically choose resolution f [DEBUG: 2018-10-08 23:46:09 : trollimage.xrimage] Interval: left=<xarray.DataArray 'reshape-59920bd5c4344e209a876883f95f2db3' (bands: 1)> array([0.]) ...
ValueError
def add_text(orig, dc, img, text=None): """Add text to an image using the pydecorate package. All the features of pydecorate's ``add_text`` are available. See documentation of :doc:`pydecorate:index` for more info. """ LOG.info("Add text to image.") dc.add_text(**text) arr = da.from_arra...
def add_text(orig, dc, img, text=None): """ Add text to an image using the pydecorate function add_text All the features in pydecorate are available See documentation of pydecorate """ LOG.info("Add text to image.") dc.add_text(**text) arr = da.from_array(np.array(img) / 255.0, chunks...
https://github.com/pytroll/satpy/issues/449
[INFO: 2018-10-08 23:46:08 : satpy.writers] Add coastlines and political borders to image. [DEBUG: 2018-10-08 23:46:08 : satpy.writers] Automagically choose resolution f [DEBUG: 2018-10-08 23:46:09 : trollimage.xrimage] Interval: left=<xarray.DataArray 'reshape-59920bd5c4344e209a876883f95f2db3' (bands: 1)> array([0.]) ...
ValueError
def add_logo(orig, dc, img, logo=None): """Add logos or other images to an image using the pydecorate package. All the features of pydecorate's ``add_logo`` are available. See documentation of :doc:`pydecorate:index` for more info. """ LOG.info("Add logo to image.") dc.add_logo(**logo) a...
def add_logo(orig, dc, img, logo=None): """ Add logos or other images to an image using the pydecorate function add_logo All the features in pydecorate are available See documentation of pydecorate """ LOG.info("Add logo to image.") dc.add_logo(**logo) arr = da.from_array(np.array(img...
https://github.com/pytroll/satpy/issues/449
[INFO: 2018-10-08 23:46:08 : satpy.writers] Add coastlines and political borders to image. [DEBUG: 2018-10-08 23:46:08 : satpy.writers] Automagically choose resolution f [DEBUG: 2018-10-08 23:46:09 : trollimage.xrimage] Interval: left=<xarray.DataArray 'reshape-59920bd5c4344e209a876883f95f2db3' (bands: 1)> array([0.]) ...
ValueError
def add_decorate(orig, fill_value=None, **decorate): """Decorate an image with text and/or logos/images. This call adds text/logos in order as given in the input to keep the alignment features available in pydecorate. An example of the decorate config:: decorate = { 'decorate': [ ...
def add_decorate(orig, fill_value=None, **decorate): """Decorate an image with text and/or logos/images. This call adds text/logos in order as given in the input to keep the alignment features available in pydecorate. An example of the decorate config:: decorate = { 'decorate': [ ...
https://github.com/pytroll/satpy/issues/449
[INFO: 2018-10-08 23:46:08 : satpy.writers] Add coastlines and political borders to image. [DEBUG: 2018-10-08 23:46:08 : satpy.writers] Automagically choose resolution f [DEBUG: 2018-10-08 23:46:09 : trollimage.xrimage] Interval: left=<xarray.DataArray 'reshape-59920bd5c4344e209a876883f95f2db3' (bands: 1)> array([0.]) ...
ValueError
def get_enhanced_image( dataset, ppp_config_dir=None, enhance=None, enhancement_config_file=None, overlay=None, decorate=None, fill_value=None, ): """Get an enhanced version of `dataset` as an :class:`~trollimage.xrimage.XRImage` instance. Args: dataset (xarray.DataArray): D...
def get_enhanced_image( dataset, ppp_config_dir=None, enhance=None, enhancement_config_file=None, overlay=None, decorate=None, fill_value=None, ): """Get an enhanced version of `dataset` as an :class:`~trollimage.xrimage.XRImage` instance. Args: dataset (xarray.DataArray): D...
https://github.com/pytroll/satpy/issues/449
[INFO: 2018-10-08 23:46:08 : satpy.writers] Add coastlines and political borders to image. [DEBUG: 2018-10-08 23:46:08 : satpy.writers] Automagically choose resolution f [DEBUG: 2018-10-08 23:46:09 : trollimage.xrimage] Interval: left=<xarray.DataArray 'reshape-59920bd5c4344e209a876883f95f2db3' (bands: 1)> array([0.]) ...
ValueError
def concatenate_dataset(self, dataset_group, var_path): if "I" in dataset_group: scan_size = 32 else: scan_size = 16 scans_path = "All_Data/{dataset_group}_All/NumberOfScans" number_of_granules_path = "Data_Products/{dataset_group}/{dataset_group}_Aggr/attr/AggregateNumberGranules" n...
def concatenate_dataset(self, dataset_group, var_path): if "I" in dataset_group: scan_size = 32 else: scan_size = 16 scans_path = "All_Data/{dataset_group}_All/NumberOfScans" scans_path = scans_path.format(dataset_group=DATASET_KEYS[dataset_group]) start_scan = 0 data_chunks = []...
https://github.com/pytroll/satpy/issues/692
[DEBUG: 2019-04-03 06:58:17 : satpy.readers] Reading ['/software/pytroll/lib-satpy-grid/lib/python3.5/site-packages/satpy-0.13.0+83.ga6479be-py3.5.egg/satpy/etc/readers/viirs_sdr.yaml'] [DEBUG: 2019-04-03 06:58:17 : satpy.scene] Setting 'PPP_CONFIG_DIR' to '/software/pytroll/lib-satpy-grid/lib/python3.5/site-packages/s...
IndexError
def get_dataset(self, dataset_id, ds_info): """Get the dataset corresponding to *dataset_id*. The size of the return DataArray will be dependent on the number of scans actually sensed, and not necessarily the regular 768 scanlines that the file contains for each granule. To that end, the number of ...
def get_dataset(self, dataset_id, ds_info): dataset_group = [ ds_group for ds_group in ds_info["dataset_groups"] if ds_group in self.datasets ] if not dataset_group: return else: dataset_group = dataset_group[0] ds_info["dataset_group"] = dataset_group var_path = self...
https://github.com/pytroll/satpy/issues/692
[DEBUG: 2019-04-03 06:58:17 : satpy.readers] Reading ['/software/pytroll/lib-satpy-grid/lib/python3.5/site-packages/satpy-0.13.0+83.ga6479be-py3.5.egg/satpy/etc/readers/viirs_sdr.yaml'] [DEBUG: 2019-04-03 06:58:17 : satpy.scene] Setting 'PPP_CONFIG_DIR' to '/software/pytroll/lib-satpy-grid/lib/python3.5/site-packages/s...
IndexError
def read_mda(attribute): """Read HDFEOS metadata and return a dict with all the key/value pairs.""" lines = attribute.split("\n") mda = {} current_dict = mda path = [] prev_line = None for line in lines: if not line: continue if line == "END": break ...
def read_mda(self, attribute): lines = attribute.split("\n") mda = {} current_dict = mda path = [] for line in lines: if not line: continue if line == "END": break key, val = line.split("=") key = key.strip() val = val.strip() t...
https://github.com/pytroll/satpy/issues/626
[DEBUG: 2019-02-20 20:07:05 : satpy.readers] Reading ['/home/aprata/anaconda3/envs/satpy-env/lib/python3.6/site-packages/satpy/etc/readers/modis_l1b.yaml'] [DEBUG: 2019-02-20 20:07:05 : satpy.scene] Setting 'PPP_CONFIG_DIR' to '/home/aprata/anaconda3/envs/satpy-env/lib/python3.6/site-packages/satpy/etc' [DEBUG: 2019-02...
SyntaxError
def __init__( self, name=None, filename=None, enhancement_config=None, base_dir=None, tags=None, **kwargs, ): ImageWriter.__init__( self, name, filename, enhancement_config, base_dir, default_config_filename="writers/mitiff.yaml", *...
def __init__(self, tags=None, **kwargs): ImageWriter.__init__(self, default_config_filename="writers/mitiff.yaml", **kwargs) self.tags = self.info.get("tags", None) if tags is None else tags if self.tags is None: self.tags = {} elif not isinstance(self.tags, dict): # if it's coming from...
https://github.com/pytroll/satpy/issues/369
scn.save_dataset('natural', writer='mitiff', filename='/tmp/mitiff.tif') [DEBUG: 2018-07-16 12:29:43 : satpy.writers] Reading ['/home/lahtinep/Software/miniconda3/lib/python3.6/site-packages/satpy-0.9.1a0.dev0-py3.6.egg/satpy/etc/writers/mitiff.yaml'] [DEBUG: 2018-07-16 12:29:43 : satpy.writers.mitiff] Starting in miti...
KeyError
def save_dataset(self, dataset, filename=None, fill_value=None, compute=True, **kwargs): LOG.debug("Starting in mitiff save_dataset ... ") def _delayed_create(create_opts, dataset): try: if "platform_name" not in kwargs: kwargs["platform_name"] = dataset.attrs["platform_name...
def save_dataset( self, dataset, filename=None, fill_value=None, compute=True, base_dir=None, **kwargs ): LOG.debug("Starting in mitiff save_dataset ... ") def _delayed_create(create_opts, dataset): LOG.debug("create_opts: %s", create_opts) try: if "platform_name" not in kwargs:...
https://github.com/pytroll/satpy/issues/369
scn.save_dataset('natural', writer='mitiff', filename='/tmp/mitiff.tif') [DEBUG: 2018-07-16 12:29:43 : satpy.writers] Reading ['/home/lahtinep/Software/miniconda3/lib/python3.6/site-packages/satpy-0.9.1a0.dev0-py3.6.egg/satpy/etc/writers/mitiff.yaml'] [DEBUG: 2018-07-16 12:29:43 : satpy.writers.mitiff] Starting in miti...
KeyError
def _delayed_create(create_opts, dataset): try: if "platform_name" not in kwargs: kwargs["platform_name"] = dataset.attrs["platform_name"] if "name" not in kwargs: kwargs["name"] = dataset.attrs["name"] if "start_time" not in kwargs: kwargs["start_time"] =...
def _delayed_create(create_opts, dataset): LOG.debug("create_opts: %s", create_opts) try: if "platform_name" not in kwargs: kwargs["platform_name"] = dataset.attrs["platform_name"] if "name" not in kwargs: kwargs["name"] = dataset.attrs["name"] if "start_time" not...
https://github.com/pytroll/satpy/issues/369
scn.save_dataset('natural', writer='mitiff', filename='/tmp/mitiff.tif') [DEBUG: 2018-07-16 12:29:43 : satpy.writers] Reading ['/home/lahtinep/Software/miniconda3/lib/python3.6/site-packages/satpy-0.9.1a0.dev0-py3.6.egg/satpy/etc/writers/mitiff.yaml'] [DEBUG: 2018-07-16 12:29:43 : satpy.writers.mitiff] Starting in miti...
KeyError
def save_datasets( self, datasets, filename=None, fill_value=None, compute=True, **kwargs ): """Save all datasets to one or more files.""" LOG.debug("Starting in mitiff save_datasets ... ") def _delayed_create(create_opts, datasets): LOG.debug("create_opts: %s", create_opts) try: ...
def save_datasets(self, datasets, compute=True, **kwargs): """Save all datasets to one or more files.""" LOG.debug("Starting in mitiff save_datasets ... ") LOG.debug("kwargs: %s", kwargs) def _delayed_create(create_opts, datasets): LOG.debug("create_opts: %s", create_opts) try: ...
https://github.com/pytroll/satpy/issues/369
scn.save_dataset('natural', writer='mitiff', filename='/tmp/mitiff.tif') [DEBUG: 2018-07-16 12:29:43 : satpy.writers] Reading ['/home/lahtinep/Software/miniconda3/lib/python3.6/site-packages/satpy-0.9.1a0.dev0-py3.6.egg/satpy/etc/writers/mitiff.yaml'] [DEBUG: 2018-07-16 12:29:43 : satpy.writers.mitiff] Starting in miti...
KeyError
def _delayed_create(create_opts, datasets): LOG.debug("create_opts: %s", create_opts) try: if "platform_name" not in kwargs: kwargs["platform_name"] = datasets.attrs["platform_name"] if "name" not in kwargs: kwargs["name"] = datasets[0].attrs["name"] if "start_tim...
def _delayed_create(create_opts, datasets): LOG.debug("create_opts: %s", create_opts) try: if "platform_name" not in kwargs: kwargs["platform_name"] = datasets.attrs["platform_name"] if "name" not in kwargs: kwargs["name"] = datasets[0].attrs["name"] if "start_tim...
https://github.com/pytroll/satpy/issues/369
scn.save_dataset('natural', writer='mitiff', filename='/tmp/mitiff.tif') [DEBUG: 2018-07-16 12:29:43 : satpy.writers] Reading ['/home/lahtinep/Software/miniconda3/lib/python3.6/site-packages/satpy-0.9.1a0.dev0-py3.6.egg/satpy/etc/writers/mitiff.yaml'] [DEBUG: 2018-07-16 12:29:43 : satpy.writers.mitiff] Starting in miti...
KeyError
def _add_proj4_string(self, datasets, first_dataset): proj4_string = " Proj string: " if isinstance(datasets, list): proj4_string += first_dataset.attrs["area"].proj4_string else: proj4_string += datasets.attrs["area"].proj4_string x_0 = 0 y_0 = 0 if "EPSG:32631" in proj4_strin...
def _add_proj4_string(self, datasets, first_dataset): proj4_string = " Proj string: " if isinstance(datasets, list): proj4_string += first_dataset.attrs["area"].proj4_string else: proj4_string += datasets.attrs["area"].proj4_string x_0 = 0 y_0 = 0 if "EPSG:32631" in proj4_strin...
https://github.com/pytroll/satpy/issues/369
scn.save_dataset('natural', writer='mitiff', filename='/tmp/mitiff.tif') [DEBUG: 2018-07-16 12:29:43 : satpy.writers] Reading ['/home/lahtinep/Software/miniconda3/lib/python3.6/site-packages/satpy-0.9.1a0.dev0-py3.6.egg/satpy/etc/writers/mitiff.yaml'] [DEBUG: 2018-07-16 12:29:43 : satpy.writers.mitiff] Starting in miti...
KeyError
def _add_calibration_datasets( self, ch, datasets, reverse_offset, reverse_scale, decimals ): _reverse_offset = reverse_offset _reverse_scale = reverse_scale _decimals = decimals _table_calibration = "" found_calibration = False skip_calibration = False for i, ds in enumerate(datasets): ...
def _add_calibration_datasets( self, ch, datasets, reverse_offset, reverse_scale, decimals ): _reverse_offset = reverse_offset _reverse_scale = reverse_scale _decimals = decimals _table_calibration = "" found_calibration = False skip_calibration = False for i, ds in enumerate(datasets): ...
https://github.com/pytroll/satpy/issues/369
scn.save_dataset('natural', writer='mitiff', filename='/tmp/mitiff.tif') [DEBUG: 2018-07-16 12:29:43 : satpy.writers] Reading ['/home/lahtinep/Software/miniconda3/lib/python3.6/site-packages/satpy-0.9.1a0.dev0-py3.6.egg/satpy/etc/writers/mitiff.yaml'] [DEBUG: 2018-07-16 12:29:43 : satpy.writers.mitiff] Starting in miti...
KeyError
def _add_calibration(self, channels, cns, datasets, **kwargs): _table_calibration = "" skip_calibration = False for ch in channels: palette = False # Make calibration. if palette: raise NotImplementedError("Mitiff palette saving is not implemented.") else: ...
def _add_calibration(self, channels, cns, datasets, **kwargs): _table_calibration = "" skip_calibration = False for ch in channels: palette = False # Make calibration. if palette: raise NotImplementedError("Mitiff palette saving is not implemented.") else: ...
https://github.com/pytroll/satpy/issues/369
scn.save_dataset('natural', writer='mitiff', filename='/tmp/mitiff.tif') [DEBUG: 2018-07-16 12:29:43 : satpy.writers] Reading ['/home/lahtinep/Software/miniconda3/lib/python3.6/site-packages/satpy-0.9.1a0.dev0-py3.6.egg/satpy/etc/writers/mitiff.yaml'] [DEBUG: 2018-07-16 12:29:43 : satpy.writers.mitiff] Starting in miti...
KeyError
def _make_image_description(self, datasets, **kwargs): """ generate image description for mitiff. Satellite: NOAA 18 Date and Time: 06:58 31/05-2016 SatDir: 0 Channels: 6 In this file: 1-VIS0.63 2-VIS0.86 3(3B)-IR3.7 4-IR10.8 5-IR11.5 6(3A)-VIS1.6 Xsize: 4720 Ysize: 5544 Map...
def _make_image_description(self, datasets, **kwargs): """ generate image description for mitiff. Satellite: NOAA 18 Date and Time: 06:58 31/05-2016 SatDir: 0 Channels: 6 In this file: 1-VIS0.63 2-VIS0.86 3(3B)-IR3.7 4-IR10.8 5-IR11.5 6(3A)-VIS1.6 Xsize: 4720 Ysize: 5544 Map...
https://github.com/pytroll/satpy/issues/369
scn.save_dataset('natural', writer='mitiff', filename='/tmp/mitiff.tif') [DEBUG: 2018-07-16 12:29:43 : satpy.writers] Reading ['/home/lahtinep/Software/miniconda3/lib/python3.6/site-packages/satpy-0.9.1a0.dev0-py3.6.egg/satpy/etc/writers/mitiff.yaml'] [DEBUG: 2018-07-16 12:29:43 : satpy.writers.mitiff] Starting in miti...
KeyError
def read_band(self, key, info): """Read the data.""" shape = int(np.ceil(self.mda["data_field_length"] / 8.0)) if self.mda["number_of_bits_per_pixel"] == 16: dtype = ">u2" shape //= 2 elif self.mda["number_of_bits_per_pixel"] in [8, 10]: dtype = np.uint8 shape = (shape,) ...
def read_band(self, key, info): """Read the data.""" shape = int(np.ceil(self.mda["data_field_length"] / 8.0)) if self.mda["number_of_bits_per_pixel"] == 16: dtype = ">u2" shape /= 2 elif self.mda["number_of_bits_per_pixel"] in [8, 10]: dtype = np.uint8 shape = (shape,) d...
https://github.com/pytroll/satpy/issues/328
filenames=find_files_and_readers(base_dir='./DK01_201101010030/', reader='hrit_jma') scn = Scene(filenames=filenames) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-2-5fb0dc98e3f1> in <module>() 1 fi...
TypeError
def __init__(self, filename, filename_info, filetype_info): """Initialize the reader.""" super(HRITJMAFileHandler, self).__init__( filename, filename_info, filetype_info, (jma_hdr_map, jma_variable_length_headers, jma_text_headers), ) self.mda["segment_sequence_number"] ...
def __init__(self, filename, filename_info, filetype_info): """Initialize the reader.""" super(HRITJMAFileHandler, self).__init__( filename, filename_info, filetype_info, (jma_hdr_map, jma_variable_length_headers, jma_text_headers), ) self.mda["segment_sequence_number"] ...
https://github.com/pytroll/satpy/issues/328
filenames=find_files_and_readers(base_dir='./DK01_201101010030/', reader='hrit_jma') scn = Scene(filenames=filenames) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-2-5fb0dc98e3f1> in <module>() 1 fi...
TypeError
def omerc2cf(area): """Return the cf grid mapping for the omerc projection.""" proj_dict = area.proj_dict args = dict( azimuth_of_central_line=proj_dict.get("alpha"), latitude_of_projection_origin=proj_dict.get("lat_0"), longitude_of_projection_origin=proj_dict.get("lonc"), ...
def omerc2cf(proj_dict): """Return the cf grid mapping for the omerc projection.""" if "no_rot" in proj_dict: no_rotation = " " else: no_rotation = None args = dict( azimuth_of_central_line=proj_dict.get("alpha"), latitude_of_projection_origin=proj_dict.get("lat_0"), ...
https://github.com/pytroll/satpy/issues/123
[INFO: 2017-12-12 08:14:04 : satpy.writers.cf_writer] Saving datasets to NetCDF4/CF. [INFO: 2017-12-12 08:14:04 : satpy.writers.cf_writer] No longitude and latitude data to save. [INFO: 2017-12-12 08:14:04 : satpy.writers.cf_writer] No grid mapping to save. --------------------------------------------------------------...
AttributeError
def geos2cf(area): """Return the cf grid mapping for the geos projection.""" proj_dict = area.proj_dict args = dict( perspective_point_height=proj_dict.get("h"), latitude_of_projection_origin=proj_dict.get("lat_0"), longitude_of_projection_origin=proj_dict.get("lon_0"), grid_...
def geos2cf(proj_dict): """Return the cf grid mapping for the geos projection.""" args = dict( perspective_point_height=proj_dict.get("h"), latitude_of_projection_origin=proj_dict.get("lat_0"), longitude_of_projection_origin=proj_dict.get("lon_0"), grid_mapping_name="geostationar...
https://github.com/pytroll/satpy/issues/123
[INFO: 2017-12-12 08:14:04 : satpy.writers.cf_writer] Saving datasets to NetCDF4/CF. [INFO: 2017-12-12 08:14:04 : satpy.writers.cf_writer] No longitude and latitude data to save. [INFO: 2017-12-12 08:14:04 : satpy.writers.cf_writer] No grid mapping to save. --------------------------------------------------------------...
AttributeError
def laea2cf(area): """Return the cf grid mapping for the laea projection.""" proj_dict = area.proj_dict args = dict( latitude_of_projection_origin=proj_dict.get("lat_0"), longitude_of_projection_origin=proj_dict.get("lon_0"), grid_mapping_name="lambert_azimuthal_equal_area", ) ...
def laea2cf(proj_dict): """Return the cf grid mapping for the laea projection.""" args = dict( latitude_of_projection_origin=proj_dict.get("lat_0"), longitude_of_projection_origin=proj_dict.get("lon_0"), grid_mapping_name="lambert_azimuthal_equal_area", ) return args
https://github.com/pytroll/satpy/issues/123
[INFO: 2017-12-12 08:14:04 : satpy.writers.cf_writer] Saving datasets to NetCDF4/CF. [INFO: 2017-12-12 08:14:04 : satpy.writers.cf_writer] No longitude and latitude data to save. [INFO: 2017-12-12 08:14:04 : satpy.writers.cf_writer] No grid mapping to save. --------------------------------------------------------------...
AttributeError
def create_grid_mapping(area): """Create the grid mapping instance for `area`.""" try: grid_mapping = mappings[area.proj_dict["proj"]](area) grid_mapping["name"] = area.proj_dict["proj"] except KeyError: raise NotImplementedError return grid_mapping
def create_grid_mapping(area): """Create the grid mapping instance for `area`.""" try: grid_mapping = mappings[area.proj_dict["proj"]](area.proj_dict) grid_mapping["name"] = area.proj_dict["proj"] except KeyError: raise NotImplementedError return grid_mapping
https://github.com/pytroll/satpy/issues/123
[INFO: 2017-12-12 08:14:04 : satpy.writers.cf_writer] Saving datasets to NetCDF4/CF. [INFO: 2017-12-12 08:14:04 : satpy.writers.cf_writer] No longitude and latitude data to save. [INFO: 2017-12-12 08:14:04 : satpy.writers.cf_writer] No grid mapping to save. --------------------------------------------------------------...
AttributeError
def da2cf(dataarray, epoch=EPOCH): """Convert the dataarray to something cf-compatible.""" new_data = dataarray.copy() # Remove the area new_data.attrs.pop("area", None) anc = [ds.attrs["name"] for ds in new_data.attrs.get("ancillary_variables", [])] if anc: new_data.attrs["ancillary_v...
def da2cf(dataarray, epoch=EPOCH): """Convert the dataarray to something cf-compatible.""" new_data = dataarray.copy() # TODO: make these boundaries of the time dimension new_data.attrs.pop("start_time", None) new_data.attrs.pop("end_time", None) # Remove the area new_data.attrs.pop("area",...
https://github.com/pytroll/satpy/issues/123
[INFO: 2017-12-12 08:14:04 : satpy.writers.cf_writer] Saving datasets to NetCDF4/CF. [INFO: 2017-12-12 08:14:04 : satpy.writers.cf_writer] No longitude and latitude data to save. [INFO: 2017-12-12 08:14:04 : satpy.writers.cf_writer] No grid mapping to save. --------------------------------------------------------------...
AttributeError