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
async def reset(self, *, timeout=None): self._check_open() self._listeners.clear() self._log_listeners.clear() reset_query = self._get_reset_query() if reset_query: await self.execute(reset_query, timeout=timeout)
async def reset(self): self._check_open() self._listeners.clear() self._log_listeners.clear() reset_query = self._get_reset_query() if reset_query: await self.execute(reset_query)
https://github.com/MagicStack/asyncpg/issues/220
[2017-11-01 00:09:25,800] (ERROR) asyncio: Task was destroyed but it is pending! task: <Task pending coro=<Pool.release.<locals>._release_impl() running at /usr/local/lib/python3.6/site-packages/asyncpg/pool.py:465> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f830f109d68>()]> cb=[shield.<locals>._d...
AttributeError
def _cancel_current_command(self, waiter): self._cancellations.add(self._loop.create_task(self._cancel(waiter)))
def _cancel_current_command(self, waiter): async def cancel(): try: # Open new connection to the server r, w = await connect_utils._open_connection( loop=self._loop, addr=self._addr, params=self._params ) except Exception as ex: waiter....
https://github.com/MagicStack/asyncpg/issues/220
[2017-11-01 00:09:25,800] (ERROR) asyncio: Task was destroyed but it is pending! task: <Task pending coro=<Pool.release.<locals>._release_impl() running at /usr/local/lib/python3.6/site-packages/asyncpg/pool.py:465> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f830f109d68>()]> cb=[shield.<locals>._d...
AttributeError
def __init__( self, pool, *, connect_args, connect_kwargs, max_queries, setup, init, max_inactive_time, ): self._pool = pool self._con = None self._connect_args = connect_args self._connect_kwargs = connect_kwargs self._max_queries = max_queries self._max_ina...
def __init__( self, pool, *, connect_args, connect_kwargs, max_queries, setup, init, max_inactive_time, ): self._pool = pool self._con = None self._connect_args = connect_args self._connect_kwargs = connect_kwargs self._max_queries = max_queries self._max_ina...
https://github.com/MagicStack/asyncpg/issues/220
[2017-11-01 00:09:25,800] (ERROR) asyncio: Task was destroyed but it is pending! task: <Task pending coro=<Pool.release.<locals>._release_impl() running at /usr/local/lib/python3.6/site-packages/asyncpg/pool.py:465> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f830f109d68>()]> cb=[shield.<locals>._d...
AttributeError
async def release(self, timeout): assert self._in_use self._in_use = False self._timeout = None self._con._on_release() if self._con.is_closed(): self._con = None elif self._con._protocol.queries_count >= self._max_queries: try: await self._con.close(timeout=timeou...
async def release(self): assert self._in_use self._in_use = False self._con._on_release() if self._con.is_closed(): self._con = None elif self._con._protocol.queries_count >= self._max_queries: try: await self._con.close() finally: self._con = None ...
https://github.com/MagicStack/asyncpg/issues/220
[2017-11-01 00:09:25,800] (ERROR) asyncio: Task was destroyed but it is pending! task: <Task pending coro=<Pool.release.<locals>._release_impl() running at /usr/local/lib/python3.6/site-packages/asyncpg/pool.py:465> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f830f109d68>()]> cb=[shield.<locals>._d...
AttributeError
async def _acquire(self, timeout): async def _acquire_impl(): ch = await self._queue.get() # type: PoolConnectionHolder try: proxy = await ch.acquire() # type: PoolConnectionProxy except Exception: self._queue.put_nowait(ch) raise else: ...
async def _acquire(self, timeout): async def _acquire_impl(): ch = await self._queue.get() # type: PoolConnectionHolder try: proxy = await ch.acquire() # type: PoolConnectionProxy except Exception: self._queue.put_nowait(ch) raise else: ...
https://github.com/MagicStack/asyncpg/issues/220
[2017-11-01 00:09:25,800] (ERROR) asyncio: Task was destroyed but it is pending! task: <Task pending coro=<Pool.release.<locals>._release_impl() running at /usr/local/lib/python3.6/site-packages/asyncpg/pool.py:465> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f830f109d68>()]> cb=[shield.<locals>._d...
AttributeError
async def _acquire_impl(): ch = await self._queue.get() # type: PoolConnectionHolder try: proxy = await ch.acquire() # type: PoolConnectionProxy except Exception: self._queue.put_nowait(ch) raise else: # Record the timeout, as we will apply it by default # in re...
async def _acquire_impl(): ch = await self._queue.get() # type: PoolConnectionHolder try: proxy = await ch.acquire() # type: PoolConnectionProxy except Exception: self._queue.put_nowait(ch) raise else: return proxy
https://github.com/MagicStack/asyncpg/issues/220
[2017-11-01 00:09:25,800] (ERROR) asyncio: Task was destroyed but it is pending! task: <Task pending coro=<Pool.release.<locals>._release_impl() running at /usr/local/lib/python3.6/site-packages/asyncpg/pool.py:465> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f830f109d68>()]> cb=[shield.<locals>._d...
AttributeError
async def release(self, connection, *, timeout=None): """Release a database connection back to the pool. :param Connection connection: A :class:`~asyncpg.connection.Connection` object to release. :param float timeout: A timeout for releasing the connection. If not specified, defaults ...
async def release(self, connection): """Release a database connection back to the pool.""" async def _release_impl(ch: PoolConnectionHolder): try: await ch.release() finally: self._queue.put_nowait(ch) self._check_init() if ( type(connection) is not Poo...
https://github.com/MagicStack/asyncpg/issues/220
[2017-11-01 00:09:25,800] (ERROR) asyncio: Task was destroyed but it is pending! task: <Task pending coro=<Pool.release.<locals>._release_impl() running at /usr/local/lib/python3.6/site-packages/asyncpg/pool.py:465> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f830f109d68>()]> cb=[shield.<locals>._d...
AttributeError
async def _release_impl(ch: PoolConnectionHolder, timeout: float): try: await ch.release(timeout) finally: self._queue.put_nowait(ch)
async def _release_impl(ch: PoolConnectionHolder): try: await ch.release() finally: self._queue.put_nowait(ch)
https://github.com/MagicStack/asyncpg/issues/220
[2017-11-01 00:09:25,800] (ERROR) asyncio: Task was destroyed but it is pending! task: <Task pending coro=<Pool.release.<locals>._release_impl() running at /usr/local/lib/python3.6/site-packages/asyncpg/pool.py:465> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f830f109d68>()]> cb=[shield.<locals>._d...
AttributeError
def __init__( self, protocol, transport, loop, addr: (str, int) or str, config: connect_utils._ClientConfiguration, params: connect_utils._ConnectionParameters, ): self._protocol = protocol self._transport = transport self._loop = loop self._top_xact = None self._uid = 0 ...
def __init__( self, protocol, transport, loop, addr: (str, int) or str, config: connect_utils._ClientConfiguration, params: connect_utils._ConnectionParameters, ): self._protocol = protocol self._transport = transport self._loop = loop self._types_stmt = None self._type_b...
https://github.com/MagicStack/asyncpg/issues/198
In [1]: import os, asyncpg, asyncio In [2]: loop = asyncio.get_event_loop() In [3]: conn = loop.run_until_complete(asyncpg.connect( ...: host = 'pgaas.mail.yandex.net', ...: port = 12000, ...: user = 'statinfra_api', ...: database = 'statinfra_api_beta', ...: password=os.environ['DB_PASSWORD'], .....
InvalidSQLStatementNameError
async def _get_statement(self, query, timeout, *, named: bool = False): statement = self._stmt_cache.get(query) if statement is not None: return statement # Only use the cache when: # * `statement_cache_size` is greater than 0; # * query size is less than `max_cacheable_statement_size`. ...
async def _get_statement(self, query, timeout, *, named: bool = False): statement = self._stmt_cache.get(query) if statement is not None: return statement # Only use the cache when: # * `statement_cache_size` is greater than 0; # * query size is less than `max_cacheable_statement_size`. ...
https://github.com/MagicStack/asyncpg/issues/198
In [1]: import os, asyncpg, asyncio In [2]: loop = asyncio.get_event_loop() In [3]: conn = loop.run_until_complete(asyncpg.connect( ...: host = 'pgaas.mail.yandex.net', ...: port = 12000, ...: user = 'statinfra_api', ...: database = 'statinfra_api_beta', ...: password=os.environ['DB_PASSWORD'], .....
InvalidSQLStatementNameError
async def set_type_codec( self, typename, *, schema="public", encoder, decoder, binary=None, format="text" ): """Set an encoder/decoder pair for the specified data type. :param typename: Name of the data type the codec is for. :param schema: Schema name of the data type the codec is fo...
async def set_type_codec( self, typename, *, schema="public", encoder, decoder, binary=None, format="text" ): """Set an encoder/decoder pair for the specified data type. :param typename: Name of the data type the codec is for. :param schema: Schema name of the data type the codec is fo...
https://github.com/MagicStack/asyncpg/issues/198
In [1]: import os, asyncpg, asyncio In [2]: loop = asyncio.get_event_loop() In [3]: conn = loop.run_until_complete(asyncpg.connect( ...: host = 'pgaas.mail.yandex.net', ...: port = 12000, ...: user = 'statinfra_api', ...: database = 'statinfra_api_beta', ...: password=os.environ['DB_PASSWORD'], .....
InvalidSQLStatementNameError
async def reset_type_codec(self, typename, *, schema="public"): """Reset *typename* codec to the default implementation. :param typename: Name of the data type the codec is for. :param schema: Schema name of the data type the codec is for (defaults to ``'public'``) .. versiona...
async def reset_type_codec(self, typename, *, schema="public"): """Reset *typename* codec to the default implementation. :param typename: Name of the data type the codec is for. :param schema: Schema name of the data type the codec is for (defaults to ``'public'``) .. versiona...
https://github.com/MagicStack/asyncpg/issues/198
In [1]: import os, asyncpg, asyncio In [2]: loop = asyncio.get_event_loop() In [3]: conn = loop.run_until_complete(asyncpg.connect( ...: host = 'pgaas.mail.yandex.net', ...: port = 12000, ...: user = 'statinfra_api', ...: database = 'statinfra_api_beta', ...: password=os.environ['DB_PASSWORD'], .....
InvalidSQLStatementNameError
async def set_builtin_type_codec(self, typename, *, schema="public", codec_name): """Set a builtin codec for the specified data type. :param typename: Name of the data type the codec is for. :param schema: Schema name of the data type the codec is for (defaults to 'public') :param...
async def set_builtin_type_codec(self, typename, *, schema="public", codec_name): """Set a builtin codec for the specified data type. :param typename: Name of the data type the codec is for. :param schema: Schema name of the data type the codec is for (defaults to 'public') :param...
https://github.com/MagicStack/asyncpg/issues/198
In [1]: import os, asyncpg, asyncio In [2]: loop = asyncio.get_event_loop() In [3]: conn = loop.run_until_complete(asyncpg.connect( ...: host = 'pgaas.mail.yandex.net', ...: port = 12000, ...: user = 'statinfra_api', ...: database = 'statinfra_api_beta', ...: password=os.environ['DB_PASSWORD'], .....
InvalidSQLStatementNameError
async def _execute(self, query, args, limit, timeout, return_status=False): with self._stmt_exclusive_section: result, _ = await self.__execute( query, args, limit, timeout, return_status=return_status ) return result
async def _execute(self, query, args, limit, timeout, return_status=False): executor = lambda stmt, timeout: self._protocol.bind_execute( stmt, args, "", limit, return_status, timeout ) timeout = self._protocol._get_timeout(timeout) with self._stmt_exclusive_section: return await self._d...
https://github.com/MagicStack/asyncpg/issues/198
In [1]: import os, asyncpg, asyncio In [2]: loop = asyncio.get_event_loop() In [3]: conn = loop.run_until_complete(asyncpg.connect( ...: host = 'pgaas.mail.yandex.net', ...: port = 12000, ...: user = 'statinfra_api', ...: database = 'statinfra_api_beta', ...: password=os.environ['DB_PASSWORD'], .....
InvalidSQLStatementNameError
async def _executemany(self, query, args, timeout): executor = lambda stmt, timeout: self._protocol.bind_execute_many( stmt, args, "", timeout ) timeout = self._protocol._get_timeout(timeout) with self._stmt_exclusive_section: result, _ = await self._do_execute(query, executor, timeout) ...
async def _executemany(self, query, args, timeout): executor = lambda stmt, timeout: self._protocol.bind_execute_many( stmt, args, "", timeout ) timeout = self._protocol._get_timeout(timeout) with self._stmt_exclusive_section: return await self._do_execute(query, executor, timeout)
https://github.com/MagicStack/asyncpg/issues/198
In [1]: import os, asyncpg, asyncio In [2]: loop = asyncio.get_event_loop() In [3]: conn = loop.run_until_complete(asyncpg.connect( ...: host = 'pgaas.mail.yandex.net', ...: port = 12000, ...: user = 'statinfra_api', ...: database = 'statinfra_api_beta', ...: password=os.environ['DB_PASSWORD'], .....
InvalidSQLStatementNameError
async def _do_execute(self, query, executor, timeout, retry=True): if timeout is None: stmt = await self._get_statement(query, None) else: before = time.monotonic() stmt = await self._get_statement(query, timeout) after = time.monotonic() timeout -= after - before ...
async def _do_execute(self, query, executor, timeout, retry=True): if timeout is None: stmt = await self._get_statement(query, None) else: before = time.monotonic() stmt = await self._get_statement(query, timeout) after = time.monotonic() timeout -= after - before ...
https://github.com/MagicStack/asyncpg/issues/198
In [1]: import os, asyncpg, asyncio In [2]: loop = asyncio.get_event_loop() In [3]: conn = loop.run_until_complete(asyncpg.connect( ...: host = 'pgaas.mail.yandex.net', ...: port = 12000, ...: user = 'statinfra_api', ...: database = 'statinfra_api_beta', ...: password=os.environ['DB_PASSWORD'], .....
InvalidSQLStatementNameError
def get_mx_flags(build_ext, cpp_flags): mx_include_dirs = [get_mx_include_dirs()] mx_lib_dirs = get_mx_lib_dirs() mx_libs = get_mx_libs(build_ext, mx_lib_dirs, cpp_flags) compile_flags = [] has_mkldnn = is_mx_mkldnn() for include_dir in mx_include_dirs: compile_flags.append("-I%s" % inc...
def get_mx_flags(build_ext, cpp_flags): mx_include_dirs = [get_mx_include_dirs()] mx_lib_dirs = get_mx_lib_dirs() mx_libs = get_mx_libs(build_ext, mx_lib_dirs, cpp_flags) compile_flags = [] for include_dir in mx_include_dirs: compile_flags.append("-I%s" % include_dir) link_flags = [] ...
https://github.com/bytedance/byteps/issues/222
(mx_byteps) ubuntu@ip-172-31-85-4:~$ bpslaunch python byteps/example/mxnet/train_imagenet_byteps.py --benchmark 1 --batch-size=32 BytePS launching worker INFO:root:start with arguments Namespace(batch_size=32, benchmark=1, cpu_train=False, data_nthreads=4, data_train=None, data_train_idx='', data_val=None, data_val_idx...
subprocess.CalledProcessError
def build_mx_extension(build_ext, options): # clear ROLE -- installation does not need this os.environ.pop("DMLC_ROLE", None) check_mx_version() mx_compile_flags, mx_link_flags = get_mx_flags(build_ext, options["COMPILE_FLAGS"]) mx_have_cuda = is_mx_cuda() macro_have_cuda = check_macro(options...
def build_mx_extension(build_ext, options): # clear ROLE -- installation does not need this os.environ.pop("DMLC_ROLE", None) check_mx_version() mx_compile_flags, mx_link_flags = get_mx_flags(build_ext, options["COMPILE_FLAGS"]) mx_have_cuda = is_mx_cuda() macro_have_cuda = check_macro(options...
https://github.com/bytedance/byteps/issues/222
(mx_byteps) ubuntu@ip-172-31-85-4:~$ bpslaunch python byteps/example/mxnet/train_imagenet_byteps.py --benchmark 1 --batch-size=32 BytePS launching worker INFO:root:start with arguments Namespace(batch_size=32, benchmark=1, cpu_train=False, data_nthreads=4, data_train=None, data_train_idx='', data_val=None, data_val_idx...
subprocess.CalledProcessError
def _push_pull_grad_async(self, p): """Call byteps API to push-pull gradient asynchronously Arguments: tensor: The tensor to push-pull. name: The name of the tensor. Returns: an push-pull handle and context """ name = self._parameter_names.get(id(p)) tensor = p.grad t...
def _push_pull_grad_async(self, p): """Call byteps API to push-pull gradient asynchronously Arguments: tensor: The tensor to push-pull. name: The name of the tensor. Returns: an push-pull handle and context """ name = self._parameter_names.get(p) tensor = p.grad tenso...
https://github.com/bytedance/byteps/issues/143
Traceback (most recent call last): File "/usr/local/byteps/example/pytorch/benchmark_bytescheduler.py", line 134, in <module> timeit.timeit(benchmark_step, number=args.num_warmup_batches) File "/opt/anaconda/lib/python3.7/timeit.py", line 232, in timeit return Timer(stmt, setup, timer, globals).timeit(number) File "/op...
RuntimeError
def _poll(self): """Poll the completion of the tensor's backward or push-pull from a FIFO event_queue""" while True: p, handle, ctx = self._event_queue.get() if p is None: self._logger.debug("poller exits.") break # Check whether the push-pull is finished. If so, ...
def _poll(self): """Poll the completion of the tensor's backward or push-pull from a FIFO event_queue""" while True: p, handle, ctx = self._event_queue.get() if p is None: self._logger.debug("poller exits.") break # Check whether the push-pull is finished. If so, ...
https://github.com/bytedance/byteps/issues/143
Traceback (most recent call last): File "/usr/local/byteps/example/pytorch/benchmark_bytescheduler.py", line 134, in <module> timeit.timeit(benchmark_step, number=args.num_warmup_batches) File "/opt/anaconda/lib/python3.7/timeit.py", line 232, in timeit return Timer(stmt, setup, timer, globals).timeit(number) File "/op...
RuntimeError
def _register_forward_hooks(self): """Add hook before forward propagation of each layer to block forward computation until the push-pull and parameter update is finished. The blocking is implemented using a lock.""" # Recursively find all submodules submodules = [] q = queue.LifoQueue() for mod ...
def _register_forward_hooks(self): """Add hook before forward propagation of each layer to block forward computation until the push-pull and parameter update is finished. The blocking is implemented using a lock.""" # Recursively find all submodules submodules = [] q = queue.LifoQueue() for mod ...
https://github.com/bytedance/byteps/issues/143
Traceback (most recent call last): File "/usr/local/byteps/example/pytorch/benchmark_bytescheduler.py", line 134, in <module> timeit.timeit(benchmark_step, number=args.num_warmup_batches) File "/opt/anaconda/lib/python3.7/timeit.py", line 232, in timeit return Timer(stmt, setup, timer, globals).timeit(number) File "/op...
RuntimeError
def pre_forward_hook(mod, input): for p in mod.parameters(): if p in self._handles: del self._handles[p] if p not in self._locks: continue with self._locks[p]: self._logger.debug( "{} {} is ready.".format(self._desc, self._parameter_names[i...
def pre_forward_hook(mod, input): for p in mod.parameters(): if p in self._handles: del self._handles[p] if p not in self._locks: continue with self._locks[p]: self._logger.debug( "{} {} is ready.".format(self._desc, self._parameter_names[p...
https://github.com/bytedance/byteps/issues/143
Traceback (most recent call last): File "/usr/local/byteps/example/pytorch/benchmark_bytescheduler.py", line 134, in <module> timeit.timeit(benchmark_step, number=args.num_warmup_batches) File "/opt/anaconda/lib/python3.7/timeit.py", line 232, in timeit return Timer(stmt, setup, timer, globals).timeit(number) File "/op...
RuntimeError
def _sgd(self, p): """Performs a single optimization step using SGD optimizer on a parameter. Arguments: p: The parameter to be updated. """ for group in self.param_groups: weight_decay = group["weight_decay"] momentum = group["momentum"] dampening = group["dampening"] ...
def _sgd(self, p): """Performs a single optimization step using SGD optimizer on a parameter. Arguments: p: The parameter to be updated. """ for group in self.param_groups: weight_decay = group["weight_decay"] momentum = group["momentum"] dampening = group["dampening"] ...
https://github.com/bytedance/byteps/issues/143
Traceback (most recent call last): File "/usr/local/byteps/example/pytorch/benchmark_bytescheduler.py", line 134, in <module> timeit.timeit(benchmark_step, number=args.num_warmup_batches) File "/opt/anaconda/lib/python3.7/timeit.py", line 232, in timeit return Timer(stmt, setup, timer, globals).timeit(number) File "/op...
RuntimeError
def _adam(self, p): """Performs a single optimization step using Adam optimizer on a parameter. Arguments: p: The parameter to be updated. """ for group in self.param_groups: for gp in group["params"]: if ( self._parameter_names[id(p)] != self._parameter_names...
def _adam(self, p): """Performs a single optimization step using Adam optimizer on a parameter. Arguments: p: The parameter to be updated. """ for group in self.param_groups: for gp in group["params"]: if ( self._parameter_names[p] != self._parameter_names[gp]...
https://github.com/bytedance/byteps/issues/143
Traceback (most recent call last): File "/usr/local/byteps/example/pytorch/benchmark_bytescheduler.py", line 134, in <module> timeit.timeit(benchmark_step, number=args.num_warmup_batches) File "/opt/anaconda/lib/python3.7/timeit.py", line 232, in timeit return Timer(stmt, setup, timer, globals).timeit(number) File "/op...
RuntimeError
def _rmsprop(self, p): """Performs a single optimization step using RMSprop optimizer on a parameter. Arguments: p: The parameter to be updated. """ for group in self.param_groups: for gp in group["params"]: if ( self._parameter_names[id(p)] != self._parameter...
def _rmsprop(self, p): """Performs a single optimization step using RMSprop optimizer on a parameter. Arguments: p: The parameter to be updated. """ for group in self.param_groups: for gp in group["params"]: if ( self._parameter_names[p] != self._parameter_nam...
https://github.com/bytedance/byteps/issues/143
Traceback (most recent call last): File "/usr/local/byteps/example/pytorch/benchmark_bytescheduler.py", line 134, in <module> timeit.timeit(benchmark_step, number=args.num_warmup_batches) File "/opt/anaconda/lib/python3.7/timeit.py", line 232, in timeit return Timer(stmt, setup, timer, globals).timeit(number) File "/op...
RuntimeError
def __init__(self, model, hvd_opt, num_steps=10**6): """Construct a new ScheduledOptimizer, which uses horovod optimizer under the hood for averaging gradients across all the Horovod ranks. Args: model: The training model. ByteScheduler uses the model object to register hooks. hvd_opt: Opt...
def __init__(self, model, hvd_opt, num_steps=10**6): """Construct a new ScheduledOptimizer, which uses horovod optimizer under the hood for averaging gradients across all the Horovod ranks. Args: model: The training model. ByteScheduler uses the model object to register hooks. hvd_opt: Opt...
https://github.com/bytedance/byteps/issues/110
root@mynode:~/byteps/byteschuler/examples# mpirun --allow-run-as-root -np 1 -H my_IP:1 -mca plm_rsh_args "-p 12945" python pytorch_horovod_benchmark.py hijack function <unbound method _DistributedOptimizer._register_hooks> 16:44:58.106 comm.py:185 INFO: Comm host: localhost, port: 58888 16:44:58.107 search.py:119 INFO:...
AttributeError
def _register_compressor(self, params, optimizer_params, compression_params): """Register compressor for BytePS params : mx.gluon.ParameterDict optimizer_params : dict compression_params : dict """ intra_compressor = Compression.none if not compression_params: return intra_compresso...
def _register_compressor(self, params, optimizer_params, compression_params): """Register compressor for BytePS params : mx.gluon.ParameterDict optimizer_params : dict compression_params : dict """ intra_compressor = Compression.none if not compression_params: return intra_compresso...
https://github.com/bytedance/byteps/issues/25
$ DMLC_ROLE=worker DMLC_PS_ROOT_URI=12.12.10.12 DMLC_PS_ROOT_PORT=9000 DMLC_WORKER_ID=0 DMLC_NUM_WORKER=1 DMLC_NUM_SERVER=1 python launcher/launch.py python example/tensorflow/tensorflow_mnist.py BytePS launching worker INFO:tensorflow:Create CheckpointSaverHook. Traceback (most recent call last): File "example/tensorf...
AttributeError
def _register_compressor(self, params, optimizer_params, compression_params): """Register compressor for BytePS params : mx.gluon.ParameterDict optimizer_params : dict compression_params : dict """ intra_compressor = Compression.none if not compression_params: return intra_compresso...
def _register_compressor(self, params, optimizer_params, compression_params): """Register compressor for BytePS params : mx.gluon.ParameterDict optimizer_params : dict compression_params : dict """ intra_compressor = Compression.none if not compression_params: return intra_compresso...
https://github.com/bytedance/byteps/issues/10
In [1]: import tensorflow as tf In [2]: import byteps.tensorflow as bps WARNING: Logging before flag parsing goes to stderr. W0627 11:36:47.010180 139917697820480 deprecation_wrapper.py:119] From /private/home/yuxinwu/.local/lib/python3.6/site-packages/byteps/tensorflow/__init__.py:79: The name tf.train.SessionRunHook...
TypeError
def parse_args(): parser = argparse.ArgumentParser( description="Train a model for image classification." ) parser.add_argument( "--data-dir", type=str, default="~/.mxnet/datasets/imagenet", help="training and validation pictures to use.", ) parser.add_argumen...
def parse_args(): parser = argparse.ArgumentParser( description="Train a model for image classification." ) parser.add_argument( "--data-dir", type=str, default="~/.mxnet/datasets/imagenet", help="training and validation pictures to use.", ) parser.add_argumen...
https://github.com/bytedance/byteps/issues/10
In [1]: import tensorflow as tf In [2]: import byteps.tensorflow as bps WARNING: Logging before flag parsing goes to stderr. W0627 11:36:47.010180 139917697820480 deprecation_wrapper.py:119] From /private/home/yuxinwu/.local/lib/python3.6/site-packages/byteps/tensorflow/__init__.py:79: The name tf.train.SessionRunHook...
TypeError
def main(): opt = parse_args() filehandler = logging.FileHandler(opt.logging_file) streamhandler = logging.StreamHandler() logger = logging.getLogger("") logger.setLevel(logging.INFO) logger.addHandler(filehandler) logger.addHandler(streamhandler) logger.info(opt) bps.init() ...
def main(): opt = parse_args() filehandler = logging.FileHandler(opt.logging_file) streamhandler = logging.StreamHandler() logger = logging.getLogger("") logger.setLevel(logging.INFO) logger.addHandler(filehandler) logger.addHandler(streamhandler) logger.info(opt) bps.init() ...
https://github.com/bytedance/byteps/issues/10
In [1]: import tensorflow as tf In [2]: import byteps.tensorflow as bps WARNING: Logging before flag parsing goes to stderr. W0627 11:36:47.010180 139917697820480 deprecation_wrapper.py:119] From /private/home/yuxinwu/.local/lib/python3.6/site-packages/byteps/tensorflow/__init__.py:79: The name tf.train.SessionRunHook...
TypeError
def train(ctx): if isinstance(ctx, mx.Context): ctx = [ctx] if opt.resume_params is "": net.initialize(mx.init.MSRAPrelu(), ctx=ctx) if opt.no_wd: for k, v in net.collect_params(".*beta|.*gamma|.*bias").items(): v.wd_mult = 0.0 compression_params = { "compre...
def train(ctx): if isinstance(ctx, mx.Context): ctx = [ctx] if opt.resume_params is "": net.initialize(mx.init.MSRAPrelu(), ctx=ctx) if opt.no_wd: for k, v in net.collect_params(".*beta|.*gamma|.*bias").items(): v.wd_mult = 0.0 compression_params = { "compre...
https://github.com/bytedance/byteps/issues/10
In [1]: import tensorflow as tf In [2]: import byteps.tensorflow as bps WARNING: Logging before flag parsing goes to stderr. W0627 11:36:47.010180 139917697820480 deprecation_wrapper.py:119] From /private/home/yuxinwu/.local/lib/python3.6/site-packages/byteps/tensorflow/__init__.py:79: The name tf.train.SessionRunHook...
TypeError
def read_journal(context, journal_name="default"): configuration = load_config(context.config_path) with open(configuration["journals"][journal_name]) as journal_file: journal = journal_file.read() return journal
def read_journal(journal_name="default"): config = load_config(install.CONFIG_FILE_PATH) with open(config["journals"][journal_name]) as journal_file: journal = journal_file.read() return journal
https://github.com/jrnl-org/jrnl/issues/659
Traceback (most recent call last): File "/usr/local/bin/jrnl", line 6, in <module> from jrnl.cli import run File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 14, in <module> from . import install File "/usr/local/lib/python3.7/site-packages/jrnl/install.py", line 25, in <module> CONFIG_PATH = xdg.BaseDire...
FileExistsError
def open_journal(context, journal_name="default"): configuration = load_config(context.config_path) journal_conf = configuration["journals"][journal_name] # We can override the default config on a by-journal basis if type(journal_conf) is dict: configuration.update(journal_conf) # But also ...
def open_journal(journal_name="default"): config = load_config(install.CONFIG_FILE_PATH) journal_conf = config["journals"][journal_name] # We can override the default config on a by-journal basis if type(journal_conf) is dict: config.update(journal_conf) # But also just give them a string t...
https://github.com/jrnl-org/jrnl/issues/659
Traceback (most recent call last): File "/usr/local/bin/jrnl", line 6, in <module> from jrnl.cli import run File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 14, in <module> from . import install File "/usr/local/lib/python3.7/site-packages/jrnl/install.py", line 25, in <module> CONFIG_PATH = xdg.BaseDire...
FileExistsError
def set_config(context, config_file): full_path = os.path.join("features/configs", config_file) context.config_path = os.path.abspath(full_path) if config_file.endswith("yaml") and os.path.exists(full_path): # Add jrnl version to file for 2.x journals with open(context.config_path, "a") as...
def set_config(context, config_file): full_path = os.path.join("features/configs", config_file) install.CONFIG_FILE_PATH = os.path.abspath(full_path) if config_file.endswith("yaml") and os.path.exists(full_path): # Add jrnl version to file for 2.x journals with open(install.CONFIG_FILE_PATH...
https://github.com/jrnl-org/jrnl/issues/659
Traceback (most recent call last): File "/usr/local/bin/jrnl", line 6, in <module> from jrnl.cli import run File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 14, in <module> from . import install File "/usr/local/lib/python3.7/site-packages/jrnl/install.py", line 25, in <module> CONFIG_PATH = xdg.BaseDire...
FileExistsError
def open_editor_and_enter(context, method, text=""): text = text or context.text or "" if method == "enter": file_method = "w+" elif method == "append": file_method = "a" else: file_method = "r+" def _mock_editor(command): context.editor_command = command tm...
def open_editor_and_enter(context, method, text=""): text = text or context.text or "" if method == "enter": file_method = "w+" elif method == "append": file_method = "a" else: file_method = "r+" def _mock_editor(command): context.editor_command = command tm...
https://github.com/jrnl-org/jrnl/issues/659
Traceback (most recent call last): File "/usr/local/bin/jrnl", line 6, in <module> from jrnl.cli import run File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 14, in <module> from . import install File "/usr/local/lib/python3.7/site-packages/jrnl/install.py", line 25, in <module> CONFIG_PATH = xdg.BaseDire...
FileExistsError
def run_with_input(context, command, inputs=""): # create an iterator through all inputs. These inputs will be fed one by one # to the mocked calls for 'input()', 'util.getpass()' and 'sys.stdin.read()' if context.text: text = iter(context.text.split("\n")) else: text = iter([inputs]) ...
def run_with_input(context, command, inputs=""): # create an iterator through all inputs. These inputs will be fed one by one # to the mocked calls for 'input()', 'util.getpass()' and 'sys.stdin.read()' if context.text: text = iter(context.text.split("\n")) else: text = iter([inputs]) ...
https://github.com/jrnl-org/jrnl/issues/659
Traceback (most recent call last): File "/usr/local/bin/jrnl", line 6, in <module> from jrnl.cli import run File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 14, in <module> from . import install File "/usr/local/lib/python3.7/site-packages/jrnl/install.py", line 25, in <module> CONFIG_PATH = xdg.BaseDire...
FileExistsError
def run(context, command, text=""): text = text or context.text or "" if "cache_dir" in context and context.cache_dir is not None: cache_dir = os.path.join("features", "cache", context.cache_dir) command = command.format(cache_dir=cache_dir) args = ushlex(command) def _mock_editor(com...
def run(context, command, text=""): text = text or context.text or "" if "cache_dir" in context and context.cache_dir is not None: cache_dir = os.path.join("features", "cache", context.cache_dir) command = command.format(cache_dir=cache_dir) args = ushlex(command) def _mock_editor(com...
https://github.com/jrnl-org/jrnl/issues/659
Traceback (most recent call last): File "/usr/local/bin/jrnl", line 6, in <module> from jrnl.cli import run File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 14, in <module> from . import install File "/usr/local/lib/python3.7/site-packages/jrnl/install.py", line 25, in <module> CONFIG_PATH = xdg.BaseDire...
FileExistsError
def check_journal_content(context, text, journal_name="default"): journal = read_journal(context, journal_name) assert text in journal, journal
def check_journal_content(context, text, journal_name="default"): journal = read_journal(journal_name) assert text in journal, journal
https://github.com/jrnl-org/jrnl/issues/659
Traceback (most recent call last): File "/usr/local/bin/jrnl", line 6, in <module> from jrnl.cli import run File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 14, in <module> from . import install File "/usr/local/lib/python3.7/site-packages/jrnl/install.py", line 25, in <module> CONFIG_PATH = xdg.BaseDire...
FileExistsError
def check_not_journal_content(context, text, journal_name="default"): journal = read_journal(context, journal_name) assert text not in journal, journal
def check_not_journal_content(context, text, journal_name="default"): journal = read_journal(journal_name) assert text not in journal, journal
https://github.com/jrnl-org/jrnl/issues/659
Traceback (most recent call last): File "/usr/local/bin/jrnl", line 6, in <module> from jrnl.cli import run File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 14, in <module> from . import install File "/usr/local/lib/python3.7/site-packages/jrnl/install.py", line 25, in <module> CONFIG_PATH = xdg.BaseDire...
FileExistsError
def journal_doesnt_exist(context, journal_name="default"): configuration = load_config(context.config_path) journal_path = configuration["journals"][journal_name] assert not os.path.exists(journal_path)
def journal_doesnt_exist(context, journal_name="default"): config = load_config(install.CONFIG_FILE_PATH) journal_path = config["journals"][journal_name] assert not os.path.exists(journal_path)
https://github.com/jrnl-org/jrnl/issues/659
Traceback (most recent call last): File "/usr/local/bin/jrnl", line 6, in <module> from jrnl.cli import run File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 14, in <module> from . import install File "/usr/local/lib/python3.7/site-packages/jrnl/install.py", line 25, in <module> CONFIG_PATH = xdg.BaseDire...
FileExistsError
def journal_exists(context, journal_name="default"): configuration = load_config(context.config_path) journal_path = configuration["journals"][journal_name] assert os.path.exists(journal_path)
def journal_exists(context, journal_name="default"): config = load_config(install.CONFIG_FILE_PATH) journal_path = config["journals"][journal_name] assert os.path.exists(journal_path)
https://github.com/jrnl-org/jrnl/issues/659
Traceback (most recent call last): File "/usr/local/bin/jrnl", line 6, in <module> from jrnl.cli import run File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 14, in <module> from . import install File "/usr/local/lib/python3.7/site-packages/jrnl/install.py", line 25, in <module> CONFIG_PATH = xdg.BaseDire...
FileExistsError
def config_var(context, key, value="", journal=None): value = read_value_from_string(value or context.text or "") configuration = load_config(context.config_path) if journal: configuration = configuration["journals"][journal] assert key in configuration assert configuration[key] == value
def config_var(context, key, value="", journal=None): value = read_value_from_string(value or context.text or "") config = load_config(install.CONFIG_FILE_PATH) if journal: config = config["journals"][journal] assert key in config assert config[key] == value
https://github.com/jrnl-org/jrnl/issues/659
Traceback (most recent call last): File "/usr/local/bin/jrnl", line 6, in <module> from jrnl.cli import run File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 14, in <module> from . import install File "/usr/local/lib/python3.7/site-packages/jrnl/install.py", line 25, in <module> CONFIG_PATH = xdg.BaseDire...
FileExistsError
def config_no_var(context, key, value="", journal=None): configuration = load_config(context.config_path) if journal: configuration = configuration["journals"][journal] assert key not in configuration
def config_no_var(context, key, value="", journal=None): config = load_config(install.CONFIG_FILE_PATH) if journal: config = config["journals"][journal] assert key not in config
https://github.com/jrnl-org/jrnl/issues/659
Traceback (most recent call last): File "/usr/local/bin/jrnl", line 6, in <module> from jrnl.cli import run File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 14, in <module> from . import install File "/usr/local/lib/python3.7/site-packages/jrnl/install.py", line 25, in <module> CONFIG_PATH = xdg.BaseDire...
FileExistsError
def check_journal_entries(context, number, journal_name="default"): journal = open_journal(context, journal_name) assert len(journal.entries) == number
def check_journal_entries(context, number, journal_name="default"): journal = open_journal(journal_name) assert len(journal.entries) == number
https://github.com/jrnl-org/jrnl/issues/659
Traceback (most recent call last): File "/usr/local/bin/jrnl", line 6, in <module> from jrnl.cli import run File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 14, in <module> from . import install File "/usr/local/lib/python3.7/site-packages/jrnl/install.py", line 25, in <module> CONFIG_PATH = xdg.BaseDire...
FileExistsError
def list_journal_directory(context, journal="default"): with open(context.config_path) as config_file: configuration = yaml.load(config_file, Loader=yaml.FullLoader) journal_path = configuration["journals"][journal] for root, dirnames, f in os.walk(journal_path): for file in f: p...
def list_journal_directory(context, journal="default"): with open(install.CONFIG_FILE_PATH) as config_file: config = yaml.load(config_file, Loader=yaml.FullLoader) journal_path = config["journals"][journal] for root, dirnames, f in os.walk(journal_path): for file in f: print(os.p...
https://github.com/jrnl-org/jrnl/issues/659
Traceback (most recent call last): File "/usr/local/bin/jrnl", line 6, in <module> from jrnl.cli import run File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 14, in <module> from . import install File "/usr/local/lib/python3.7/site-packages/jrnl/install.py", line 25, in <module> CONFIG_PATH = xdg.BaseDire...
FileExistsError
def cli(manual_args=None): try: if manual_args is None: manual_args = sys.argv[1:] args = parse_args(manual_args) configure_logger(args.debug) logging.debug("Parsed args: %s", args) return run(args) except JrnlError as e: print(e.message, file=sys.s...
def cli(manual_args=None): try: if manual_args is None: manual_args = sys.argv[1:] args = parse_args(manual_args) configure_logger(args.debug) logging.debug("Parsed args: %s", args) return run(args) except KeyboardInterrupt: return 1
https://github.com/jrnl-org/jrnl/issues/659
Traceback (most recent call last): File "/usr/local/bin/jrnl", line 6, in <module> from jrnl.cli import run File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 14, in <module> from . import install File "/usr/local/lib/python3.7/site-packages/jrnl/install.py", line 25, in <module> CONFIG_PATH = xdg.BaseDire...
FileExistsError
def get_journal_name(args, config): args.journal_name = DEFAULT_JOURNAL_KEY if args.text and args.text[0] in config["journals"]: args.journal_name = args.text[0] args.text = args.text[1:] elif DEFAULT_JOURNAL_KEY not in config["journals"]: print("No default journal configured.", file...
def get_journal_name(args, config): from . import install args.journal_name = install.DEFAULT_JOURNAL_KEY if args.text and args.text[0] in config["journals"]: args.journal_name = args.text[0] args.text = args.text[1:] elif install.DEFAULT_JOURNAL_KEY not in config["journals"]: p...
https://github.com/jrnl-org/jrnl/issues/659
Traceback (most recent call last): File "/usr/local/bin/jrnl", line 6, in <module> from jrnl.cli import run File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 14, in <module> from . import install File "/usr/local/lib/python3.7/site-packages/jrnl/install.py", line 25, in <module> CONFIG_PATH = xdg.BaseDire...
FileExistsError
def upgrade_config(config): """Checks if there are keys missing in a given config dict, and if so, updates the config file accordingly. This essentially automatically ports jrnl installations if new config parameters are introduced in later versions.""" default_config = get_default_config() missing_...
def upgrade_config(config): """Checks if there are keys missing in a given config dict, and if so, updates the config file accordingly. This essentially automatically ports jrnl installations if new config parameters are introduced in later versions.""" missing_keys = set(default_config).difference(conf...
https://github.com/jrnl-org/jrnl/issues/659
Traceback (most recent call last): File "/usr/local/bin/jrnl", line 6, in <module> from jrnl.cli import run File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 14, in <module> from . import install File "/usr/local/lib/python3.7/site-packages/jrnl/install.py", line 25, in <module> CONFIG_PATH = xdg.BaseDire...
FileExistsError
def load_or_install_jrnl(): """ If jrnl is already installed, loads and returns a config object. Else, perform various prompts to install jrnl. """ config_path = ( get_config_path() if os.path.exists(get_config_path()) else os.path.join(os.path.expanduser("~"), ".jrnl_config"...
def load_or_install_jrnl(): """ If jrnl is already installed, loads and returns a config object. Else, perform various prompts to install jrnl. """ config_path = ( CONFIG_FILE_PATH if os.path.exists(CONFIG_FILE_PATH) else CONFIG_FILE_PATH_FALLBACK ) if os.path.exists(...
https://github.com/jrnl-org/jrnl/issues/659
Traceback (most recent call last): File "/usr/local/bin/jrnl", line 6, in <module> from jrnl.cli import run File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 14, in <module> from . import install File "/usr/local/lib/python3.7/site-packages/jrnl/install.py", line 25, in <module> CONFIG_PATH = xdg.BaseDire...
FileExistsError
def install(): _initialize_autocomplete() # Where to create the journal? default_journal_path = get_default_journal_path() path_query = f"Path to your journal file (leave blank for {default_journal_path}): " journal_path = os.path.abspath(input(path_query).strip() or default_journal_path) defau...
def install(): _initialize_autocomplete() # Where to create the journal? path_query = f"Path to your journal file (leave blank for {JOURNAL_FILE_PATH}): " journal_path = os.path.abspath(input(path_query).strip() or JOURNAL_FILE_PATH) default_config["journals"][DEFAULT_JOURNAL_KEY] = os.path.expandu...
https://github.com/jrnl-org/jrnl/issues/659
Traceback (most recent call last): File "/usr/local/bin/jrnl", line 6, in <module> from jrnl.cli import run File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 14, in <module> from . import install File "/usr/local/lib/python3.7/site-packages/jrnl/install.py", line 25, in <module> CONFIG_PATH = xdg.BaseDire...
FileExistsError
def _edit_search_results(config, journal, old_entries, **kwargs): """ 1. Send the given journal entries to the user-configured editor 2. Print out stats on any modifications to journal 3. Write modifications to journal """ if not config["editor"]: print( f""" [{ER...
def _edit_search_results(config, journal, old_entries, **kwargs): """ 1. Send the given journal entries to the user-configured editor 2. Print out stats on any modifications to journal 3. Write modifications to journal """ if not config["editor"]: print( f""" [{ER...
https://github.com/jrnl-org/jrnl/issues/659
Traceback (most recent call last): File "/usr/local/bin/jrnl", line 6, in <module> from jrnl.cli import run File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 14, in <module> from . import install File "/usr/local/lib/python3.7/site-packages/jrnl/install.py", line 25, in <module> CONFIG_PATH = xdg.BaseDire...
FileExistsError
def list_journals(configuration): from . import config """List the journals specified in the configuration file""" result = f"Journals defined in {config.get_config_path()}\n" ml = min(max(len(k) for k in configuration["journals"]), 20) for journal, cfg in configuration["journals"].items(): ...
def list_journals(config): from . import install """List the journals specified in the configuration file""" result = f"Journals defined in {install.CONFIG_FILE_PATH}\n" ml = min(max(len(k) for k in config["journals"]), 20) for journal, cfg in config["journals"].items(): result += " * {:{}}...
https://github.com/jrnl-org/jrnl/issues/659
Traceback (most recent call last): File "/usr/local/bin/jrnl", line 6, in <module> from jrnl.cli import run File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 14, in <module> from . import install File "/usr/local/lib/python3.7/site-packages/jrnl/install.py", line 25, in <module> CONFIG_PATH = xdg.BaseDire...
FileExistsError
def set_password(self, servicename, username, password): raise keyring.errors.KeyringError
def set_password(self, servicename, username, password): self.keys[servicename][username] = password
https://github.com/jrnl-org/jrnl/issues/1020
$ jrnl -from yesterday WARNING: Python versions below 3.7 will no longer be supported as of jrnl v2.5 (the next release). You are currently on Python 3.6.9. Please update to Python 3.7 (or higher) soon. Traceback (most recent call last): File "/usr/local/bin/jrnl", line 11, in <module> sys.exit(run()) File "/usr/loca...
keyring.errors.KeyringLocked
def get_password(self, servicename, username): raise keyring.errors.KeyringError
def get_password(self, servicename, username): raise keyring.errors.NoKeyringError
https://github.com/jrnl-org/jrnl/issues/1020
$ jrnl -from yesterday WARNING: Python versions below 3.7 will no longer be supported as of jrnl v2.5 (the next release). You are currently on Python 3.6.9. Please update to Python 3.7 (or higher) soon. Traceback (most recent call last): File "/usr/local/bin/jrnl", line 11, in <module> sys.exit(run()) File "/usr/loca...
keyring.errors.KeyringLocked
def delete_password(self, servicename, username): raise keyring.errors.KeyringError
def delete_password(self, servicename, username): self.keys[servicename][username] = None
https://github.com/jrnl-org/jrnl/issues/1020
$ jrnl -from yesterday WARNING: Python versions below 3.7 will no longer be supported as of jrnl v2.5 (the next release). You are currently on Python 3.6.9. Please update to Python 3.7 (or higher) soon. Traceback (most recent call last): File "/usr/local/bin/jrnl", line 11, in <module> sys.exit(run()) File "/usr/loca...
keyring.errors.KeyringLocked
def set_keyring(context, type=""): if type == "failed": keyring.set_keyring(FailedKeyring()) else: keyring.set_keyring(TestKeyring())
def set_keyring(context): keyring.set_keyring(TestKeyring())
https://github.com/jrnl-org/jrnl/issues/1020
$ jrnl -from yesterday WARNING: Python versions below 3.7 will no longer be supported as of jrnl v2.5 (the next release). You are currently on Python 3.6.9. Please update to Python 3.7 (or higher) soon. Traceback (most recent call last): File "/usr/local/bin/jrnl", line 11, in <module> sys.exit(run()) File "/usr/loca...
keyring.errors.KeyringLocked
def get_keychain(journal_name): import keyring try: return keyring.get_password("jrnl", journal_name) except keyring.errors.KeyringError as e: if not isinstance(e, keyring.errors.NoKeyringError): print("Failed to retrieve keyring", file=sys.stderr) return ""
def get_keychain(journal_name): import keyring try: return keyring.get_password("jrnl", journal_name) except RuntimeError: return ""
https://github.com/jrnl-org/jrnl/issues/1020
$ jrnl -from yesterday WARNING: Python versions below 3.7 will no longer be supported as of jrnl v2.5 (the next release). You are currently on Python 3.6.9. Please update to Python 3.7 (or higher) soon. Traceback (most recent call last): File "/usr/local/bin/jrnl", line 11, in <module> sys.exit(run()) File "/usr/loca...
keyring.errors.KeyringLocked
def set_keychain(journal_name, password): import keyring if password is None: try: keyring.delete_password("jrnl", journal_name) except keyring.errors.KeyringError: pass else: try: keyring.set_password("jrnl", journal_name, password) excep...
def set_keychain(journal_name, password): import keyring if password is None: try: keyring.delete_password("jrnl", journal_name) except keyring.errors.PasswordDeleteError: pass else: try: keyring.set_password("jrnl", journal_name, password) ...
https://github.com/jrnl-org/jrnl/issues/1020
$ jrnl -from yesterday WARNING: Python versions below 3.7 will no longer be supported as of jrnl v2.5 (the next release). You are currently on Python 3.6.9. Please update to Python 3.7 (or higher) soon. Traceback (most recent call last): File "/usr/local/bin/jrnl", line 11, in <module> sys.exit(run()) File "/usr/loca...
keyring.errors.KeyringLocked
def make_filename(cls, entry): return entry.date.strftime("%Y-%m-%d") + "_{}.{}".format( cls._slugify(str(entry.title)), cls.extension )
def make_filename(cls, entry): return entry.date.strftime( "%Y-%m-%d_{}.{}".format(cls._slugify(str(entry.title)), cls.extension) )
https://github.com/jrnl-org/jrnl/issues/1089
Traceback (most recent call last): File "c:\python37\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\python37\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\micah\.local\bin\jrnl.exe\__main__.py", line 7, in <module> File "c:\users\micah\.local\pipx\venvs\jrnl...
UnicodeEncodeError
def _parse_text(self): raw_text = self.text lines = raw_text.splitlines() if lines and lines[0].strip().endswith("*"): self.starred = True raw_text = lines[0].strip("\n *") + "\n" + "\n".join(lines[1:]) self._title, self._body = split_title(raw_text) if self._tags is None: se...
def _parse_text(self): raw_text = self.text lines = raw_text.splitlines() if lines[0].strip().endswith("*"): self.starred = True raw_text = lines[0].strip("\n *") + "\n" + "\n".join(lines[1:]) self._title, self._body = split_title(raw_text) if self._tags is None: self._tags =...
https://github.com/jrnl-org/jrnl/issues/780
fbreunig@nighttrain:~ $ jrnl --short Traceback (most recent call last): File "/usr/local/bin/jrnl", line 8, in <module> sys.exit(run()) File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 248, in run print(journal.pprint(short=True)) File "/usr/local/lib/python3.7/site-packages/jrnl/Journal.py", line 148, i...
IndexError
def __exporter_from_file(template_file): """Create a template class from a file""" name = os.path.basename(template_file).replace(".template", "") template = Template.from_file(template_file) return type( str("{}Exporter".format(name.title())), (GenericTemplateExporter,), {"names...
def __exporter_from_file(template_file): """Create a template class from a file""" name = os.path.basename(template_file).replace(".template", "") template = Template.from_file(template_file) return type( "{}Exporter".format(name.title()), (GenericTemplateExporter,), {"names": [n...
https://github.com/jrnl-org/jrnl/issues/456
Traceback (most recent call last): File "C:\Util\Python27\lib\runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "C:\Util\Python27\lib\runpy.py", line 72, in _run_code exec code in run_globals File "d:\Projects\jrnl-nb\jrnl\__main__.py", line 4, in <module> from . import cli File "jrn...
TypeError
def getpass(prompt="Password: "): if not TEST: return gp.getpass(bytes(prompt)) else: return py23_input(prompt)
def getpass(prompt="Password: "): if not TEST: return gp.getpass(prompt) else: return py23_input(prompt)
https://github.com/jrnl-org/jrnl/issues/392
Traceback (most recent call last): File "c:\python27\lib\runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "c:\python27\lib\runpy.py", line 72, in _run_code exec code in run_globals File "C:\Python27\Scripts\jrnl.exe\__main__.py", line 9, in <module> File "c:\python27\lib\site-packag...
TypeError
def export(journal, format, output=None): """Exports the journal to various formats. format should be one of json, txt, text, md, markdown. If output is None, returns a unicode representation of the output. If output is a directory, exports entries into individual files. Otherwise, exports to the gi...
def export(journal, format, output=None): """Exports the journal to various formats. format should be one of json, txt, text, md, markdown. If output is None, returns a unicode representation of the output. If output is a directory, exports entries into individual files. Otherwise, exports to the gi...
https://github.com/jrnl-org/jrnl/issues/201
$ ls output ls: cannot access output: No such file or directory $ jrnl --export text -o output [Journal exported to output] $ rm output $ mkdir output $ jrnl --export text -o output Traceback (most recent call last): File "/home/michael/bin/jrnl", line 9, in <module> load_entry_point('jrnl==1.8.1', 'console_scripts', '...
UnboundLocalError
def write_files(journal, path, format): """Turns your journal into separate files for each entry. Format should be either json, md or txt.""" make_filename = lambda entry: e.date.strftime( "%C-%m-%d_{0}.{1}".format(slugify(u(e.title)), format) ) for e in journal.entries: full_path = ...
def write_files(journal, path, format): """Turns your journal into separate files for each entry. Format should be either json, md or txt.""" make_filename = lambda entry: e.date.strftime( "%C-%m-%d_{0}.{1}".format(slugify(u(e.title)), format) ) for e in journal.entries: full_path = ...
https://github.com/jrnl-org/jrnl/issues/201
$ ls output ls: cannot access output: No such file or directory $ jrnl --export text -o output [Journal exported to output] $ rm output $ mkdir output $ jrnl --export text -o output Traceback (most recent call last): File "/home/michael/bin/jrnl", line 9, in <module> load_entry_point('jrnl==1.8.1', 'console_scripts', '...
UnboundLocalError
def get_local_timezone(): """Returns the Olson identifier of the local timezone. In a happy world, tzlocal.get_localzone would do this, but there's a bug on OS X that prevents that right now: https://github.com/regebro/tzlocal/issues/6""" global __cached_tz if not __cached_tz and "darwin" in sys.pla...
def get_local_timezone(): """Returns the Olson identifier of the local timezone. In a happy world, tzlocal.get_localzone would do this, but there's a bug on OS X that prevents that right now: https://github.com/regebro/tzlocal/issues/6""" global __cached_tz if not __cached_tz and "darwin" in sys.pla...
https://github.com/jrnl-org/jrnl/issues/93
dio:~ milo$ jrnl new Traceback (most recent call last): File "/usr/local/share/python/jrnl", line 9, in <module> load_entry_point('jrnl==1.5.5', 'console_scripts', 'jrnl')() File "/usr/local/lib/python2.7/site-packages/jrnl/jrnl.py", line 156, in cli journal = Journal.DayOne(**config) File "/usr/local/lib/python2.7/sit...
pytz.exceptions.UnknownTimeZoneError
def _decrypt(self, cipher): """Decrypts a cipher string using self.key as the key and the first 16 byte of the cipher as the IV""" if not cipher: return "" crypto = AES.new(self.key, AES.MODE_CBC, cipher[:16]) try: plain = crypto.decrypt(cipher[16:]) except ValueError: print(...
def _decrypt(self, cipher): """Decrypts a cipher string using self.key as the key and the first 16 byte of the cipher as the IV""" if not cipher: return "" crypto = AES.new(self.key, AES.MODE_CBC, cipher[:16]) plain = crypto.decrypt(cipher[16:]) if plain[-1] != " ": # Journals are always pa...
https://github.com/jrnl-org/jrnl/issues/22
Traceback (most recent call last): (...) File "/Users/maebert/code/jrnl/jrnl.py", line 118, in _decrypt plain = crypto.decrypt(cipher[16:]) ValueError: Input strings must be a multiple of 16 in length
ValueError
def alwaysIndentBody(self, event=None): """ The always-indent-region command indents each line of the selected body text. The @tabwidth directive in effect determines amount of indentation. """ c, p, u, w = self, self.p, self.undoer, self.frame.body.wrapper # # #1801: Don't rely on bindi...
def alwaysIndentBody(self, event=None): """ The always-indent-region command indents each line of the selected body text. The @tabwidth directive in effect determines amount of indentation. """ c, p, u, w = self, self.p, self.undoer, self.frame.body.wrapper # # "Before" snapshot. bun...
https://github.com/leo-editor/leo-editor/issues/1801
Traceback (most recent call last): File "...leo\core\leoCommands.py", line 2252, in doCommand return_value = command_func(event) File "...leo\core\leoGlobals.py", line 244, in commander_command_wrapper method(event=event) File "...\leo\commands\commanderEditCommands.py", line 714, in indentBody c.editCommands.selfInser...
AttributeError
def indentBody(self, event=None): """ The indent-region command indents each line of the selected body text. Unlike the always-indent-region command, this command inserts a tab (soft or hard) when there is no selected text. The @tabwidth directive in effect determines amount of indentation. """...
def indentBody(self, event=None): """ The indent-region command indents each line of the selected body text. Unlike the always-indent-region command, this command inserts a tab (soft or hard) when there is no selected text. The @tabwidth directive in effect determines amount of indentation. """...
https://github.com/leo-editor/leo-editor/issues/1801
Traceback (most recent call last): File "...leo\core\leoCommands.py", line 2252, in doCommand return_value = command_func(event) File "...leo\core\leoGlobals.py", line 244, in commander_command_wrapper method(event=event) File "...\leo\commands\commanderEditCommands.py", line 714, in indentBody c.editCommands.selfInser...
AttributeError
def insertNewLineAndTab(self, event): """Insert a newline and tab at the cursor.""" trace = "keys" in g.app.debug c, k = self.c, self.c.k p = c.p w = self.editWidget(event) if not w: return if not g.isTextWrapper(w): return name = c.widget_name(w) if name.startswith("...
def insertNewLineAndTab(self, event): """Insert a newline and tab at the cursor.""" trace = "keys" in g.app.debug c, k = self.c, self.c.k p = c.p w = self.editWidget(event) if not w: return if not g.isTextWrapper(w): return name = c.widget_name(w) if name.startswith("...
https://github.com/leo-editor/leo-editor/issues/1801
Traceback (most recent call last): File "...leo\core\leoCommands.py", line 2252, in doCommand return_value = command_func(event) File "...leo\core\leoGlobals.py", line 244, in commander_command_wrapper method(event=event) File "...\leo\commands\commanderEditCommands.py", line 714, in indentBody c.editCommands.selfInser...
AttributeError
def selfInsertCommand(self, event, action="insert"): """ Insert a character in the body pane. This is the default binding for all keys in the body pane. It handles undo, bodykey events, tabs, back-spaces and bracket matching. """ trace = "keys" in g.app.debug c, p, u, w = self.c, self.c.p, ...
def selfInsertCommand(self, event, action="insert"): """ Insert a character in the body pane. This is the default binding for all keys in the body pane. It handles undo, bodykey events, tabs, back-spaces and bracket matching. """ trace = "keys" in g.app.debug c, p, u, w = self.c, self.c.p, ...
https://github.com/leo-editor/leo-editor/issues/1801
Traceback (most recent call last): File "...leo\core\leoCommands.py", line 2252, in doCommand return_value = command_func(event) File "...leo\core\leoGlobals.py", line 244, in commander_command_wrapper method(event=event) File "...\leo\commands\commanderEditCommands.py", line 714, in indentBody c.editCommands.selfInser...
AttributeError
def updateTab(self, event, p, w, smartTab=True): """ A helper for selfInsertCommand. Add spaces equivalent to a tab. """ c = self.c i, j = w.getSelectionRange() # Returns insert point if no selection, with i <= j. if i != j: c.indentBody(event) return tab_width = c.g...
def updateTab(self, p, w, smartTab=True): """ A helper for selfInsertCommand. Add spaces equivalent to a tab. """ c = self.c i, j = w.getSelectionRange() # Returns insert point if no selection, with i <= j. if i != j: c.indentBody() return tab_width = c.getTabWidth(p...
https://github.com/leo-editor/leo-editor/issues/1801
Traceback (most recent call last): File "...leo\core\leoCommands.py", line 2252, in doCommand return_value = command_func(event) File "...leo\core\leoGlobals.py", line 244, in commander_command_wrapper method(event=event) File "...\leo\commands\commanderEditCommands.py", line 714, in indentBody c.editCommands.selfInser...
AttributeError
def updateAfterTyping(self, p, w): """ Perform all update tasks after changing body text. This is ugly, ad-hoc code, but should be done uniformly. """ c = self.c if g.isTextWrapper(w): # An important, ever-present unit test. all = w.getAllText() if g.unitTesting: ...
def updateAfterTyping(self, p, w): """ Perform all update tasks after changing body text. This is ugly, ad-hoc code, but should be done uniformly. """ c = self.c if g.isTextWrapper(w): # An important, ever-present unit test. all = w.getAllText() if g.unitTesting: ...
https://github.com/leo-editor/leo-editor/issues/1801
Traceback (most recent call last): File "...leo\core\leoCommands.py", line 2252, in doCommand return_value = command_func(event) File "...leo\core\leoGlobals.py", line 244, in commander_command_wrapper method(event=event) File "...\leo\commands\commanderEditCommands.py", line 714, in indentBody c.editCommands.selfInser...
AttributeError
def show_all_tags(self): """Show all tags, organized by node.""" c, tc = self.c, self d = {} for p in c.all_unique_positions(): u = p.v.u tags = set(u.get(tc.TAG_LIST_KEY, set([]))) for tag in tags: aList = d.get(tag, []) aList.append(p.h) d[ta...
def show_all_tags(self): """Show all tags, organized by node.""" c, tc = self.c, self d = {} for p in c.all_unique_positions(): u = p.v.u tags = set(u.get(tc.TAG_LIST_KEY, set([]))) for tag in tags: aList = d.get(tag, []) aList.append(p.h) d[ta...
https://github.com/leo-editor/leo-editor/issues/1801
Traceback (most recent call last): File "...leo\core\leoCommands.py", line 2252, in doCommand return_value = command_func(event) File "...leo\core\leoGlobals.py", line 244, in commander_command_wrapper method(event=event) File "...\leo\commands\commanderEditCommands.py", line 714, in indentBody c.editCommands.selfInser...
AttributeError
def doTyping( self, p, undo_type, oldText, newText, newInsert=None, oldSel=None, newSel=None, oldYview=None, ): """ Save enough information to undo or redo a typing operation efficiently, that is, with the proper granularity. Do nothing when called from the undo/redo...
def doTyping( self, p, undo_type, oldText, newText, newInsert=None, oldSel=None, newSel=None, oldYview=None, ): """ Save enough information to undo or redo a typing operation efficiently, that is, with the proper granularity. Do nothing when called from the undo/redo...
https://github.com/leo-editor/leo-editor/issues/1790
Unexpected exception...Traceback (most recent call last): File "d:\Tom\git\leo-editor\leo\core\leoUndo.py", line 1054, in doTyping prev_start, prev_end = u.prevSel TypeError: cannot unpack non-iterable NoneType object
TypeError
def refreshFromDisk(self, event=None): """Refresh an @<file> node from disk.""" c, p, u = self, self.p, self.undoer c.nodeConflictList = [] fn = p.anyAtFileNodeName() shouldDelete = c.sqlite_connection is None if not fn: g.warning(f"not an @<file> node: {p.h!r}") return # #16...
def refreshFromDisk(self, event=None): """Refresh an @<file> node from disk.""" c, p, u = self, self.p, self.undoer c.nodeConflictList = [] fn = p.anyAtFileNodeName() shouldDelete = c.sqlite_connection is None if not fn: g.warning(f"not an @<file> node:\n{p.h!r}") return b = ...
https://github.com/leo-editor/leo-editor/issues/1603
readFileIntoString not a file: C:/Users/edreamleo/RustProjects/hello_cargo/src Traceback (most recent call last): File "c:\leo.repo\leo-editor\leo\plugins\contextmenu.py", line 332, in refresh_rclick_cb c.refreshFromDisk() File "c:\leo.repo\leo-editor\leo\commands\commanderFileCommands.py", line 305, in refreshFromDis...
AttributeError
def openFileHelper(self, fileName): """Open a file, reporting all exceptions.""" at = self s = "" try: with open(fileName, "rb") as f: s = f.read() except IOError: at.error(f"can not open {fileName}") except Exception: at.error(f"Exception reading {fileName}")...
def openFileHelper(self, fileName): """Open a file, reporting all exceptions.""" at = self s = None try: with open(fileName, "rb") as f: s = f.read() except IOError: at.error(f"can not open {fileName}") except Exception: at.error(f"Exception reading {fileName}...
https://github.com/leo-editor/leo-editor/issues/1603
readFileIntoString not a file: C:/Users/edreamleo/RustProjects/hello_cargo/src Traceback (most recent call last): File "c:\leo.repo\leo-editor\leo\plugins\contextmenu.py", line 332, in refresh_rclick_cb c.refreshFromDisk() File "c:\leo.repo\leo-editor\leo\commands\commanderFileCommands.py", line 305, in refreshFromDis...
AttributeError
def update_after_read_foreign_file(self, root): """Restore gnx's, uAs and clone links using @gnxs nodes and @uas trees.""" self.at_persistence = self.find_at_persistence_node() if not self.at_persistence: return if not root: return if not self.is_foreign_file(root): return ...
def update_after_read_foreign_file(self, root): """Restore gnx's, uAs and clone links using @gnxs nodes and @uas trees.""" self.at_persistence = self.find_at_persistence_node() if not self.at_persistence: return if not self.is_foreign_file(root): return # Create clone links from @gnx...
https://github.com/leo-editor/leo-editor/issues/1603
readFileIntoString not a file: C:/Users/edreamleo/RustProjects/hello_cargo/src Traceback (most recent call last): File "c:\leo.repo\leo-editor\leo\plugins\contextmenu.py", line 332, in refresh_rclick_cb c.refreshFromDisk() File "c:\leo.repo\leo-editor\leo\commands\commanderFileCommands.py", line 305, in refreshFromDis...
AttributeError
def readFile(self, path): """Read the file, change splitter ratiors, and return its hidden vnode.""" with open(path, "rb") as f: s = f.read() v, g_element = self.readWithElementTree(path, s) if not v: # #1510. return None self.scanGlobals(g_element) # Fix #1047: only this method...
def readFile(self, path): """Read the file, change splitter ratiors, and return its hidden vnode.""" with open(path, "rb") as f: s = f.read() v, g_element = self.readWithElementTree(path, s) self.scanGlobals(g_element) # Fix #1047: only this method changes splitter sizes. # # Fix bug...
https://github.com/leo-editor/leo-editor/issues/1510
bad .leo file: WORK.leo g.toUnicode: unexpected argument of type ParseError toUnicode openLeoFile,getLeoFile,readFile,readWithElementTree Traceback (most recent call last): File "E:\git\leo\leo\core\leoCommands.py", line 2278, in executeAnyCommand return command(event) File "E:\git\leo\leo\core\leoGlobals.py", line...
TypeError
def readFileFromClipboard(self, s): """ Recreate a file from a string s, and return its hidden vnode. Unlike readFile above, this does not affect splitter sizes. """ v, g_element = self.readWithElementTree(path=None, s=s) if not v: # #1510. return None # # Fix bug #1111: ensure...
def readFileFromClipboard(self, s): """ Recreate a file from a string s, and return its hidden vnode. Unlike readFile above, this does not affect splitter sizes. """ v, g_element = self.readWithElementTree(path=None, s=s) # # Fix bug #1111: ensure that all outlines have at least one node. ...
https://github.com/leo-editor/leo-editor/issues/1510
bad .leo file: WORK.leo g.toUnicode: unexpected argument of type ParseError toUnicode openLeoFile,getLeoFile,readFile,readWithElementTree Traceback (most recent call last): File "E:\git\leo\leo\core\leoCommands.py", line 2278, in executeAnyCommand return command(event) File "E:\git\leo\leo\core\leoGlobals.py", line...
TypeError
def readWithElementTree(self, path, s): contents = g.toUnicode(s) s = contents.translate(self.translate_table) # Fix #1036 and #1046. try: xroot = ElementTree.fromstring(contents) except Exception as e: # #970: Just report failure here. if path: message = f"bad .l...
def readWithElementTree(self, path, s): s = s.translate(None, self.translate_table) # Fix #1036 and #1046. contents = g.toUnicode(s) try: xroot = ElementTree.fromstring(contents) except Exception as e: if path: message = f"bad .leo file: {g.shortFileName(path)}" e...
https://github.com/leo-editor/leo-editor/issues/1510
bad .leo file: WORK.leo g.toUnicode: unexpected argument of type ParseError toUnicode openLeoFile,getLeoFile,readFile,readWithElementTree Traceback (most recent call last): File "E:\git\leo\leo\core\leoCommands.py", line 2278, in executeAnyCommand return command(event) File "E:\git\leo\leo\core\leoGlobals.py", line...
TypeError
def readWithElementTree(self, path, s): contents = g.toUnicode(s) contents = contents.translate(self.translate_table) # Fix #1036 and #1046. try: xroot = ElementTree.fromstring(contents) except Exception as e: # #970: Just report failure here. if path: message = f...
def readWithElementTree(self, path, s): contents = g.toUnicode(s) s = contents.translate(self.translate_table) # Fix #1036 and #1046. try: xroot = ElementTree.fromstring(contents) except Exception as e: # #970: Just report failure here. if path: message = f"bad .l...
https://github.com/leo-editor/leo-editor/issues/1510
bad .leo file: WORK.leo g.toUnicode: unexpected argument of type ParseError toUnicode openLeoFile,getLeoFile,readFile,readWithElementTree Traceback (most recent call last): File "E:\git\leo\leo\core\leoCommands.py", line 2278, in executeAnyCommand return command(event) File "E:\git\leo\leo\core\leoGlobals.py", line...
TypeError
def checkForOpenFile(self, c, fn): """Warn if fn is already open and add fn to already_open_files list.""" d, tag = g.app.db, "open-leo-files" if g.app.reverting: # #302: revert to saved doesn't reset external file change monitoring g.app.already_open_files = [] if ( d is None ...
def checkForOpenFile(self, c, fn): """Warn if fn is already open and add fn to already_open_files list.""" d, tag = g.app.db, "open-leo-files" if g.app.reverting: # Fix #302: revert to saved doesn't reset external file change monitoring g.app.already_open_files = [] if ( d is Non...
https://github.com/leo-editor/leo-editor/issues/1519
(base) c:\leo.repo\leo-editor>python c:\leo.repo\leo-editor\launchLeo.py --gui=qttabs --gui=qttabs leo\core\leoPy.leo leo\plugins\leoPlugins.leo Leo 6.2-b1-devel, devel branch, build 5da736ea4d 2020-02-29 06:19:36 -0600 Unexpected exception reading 'c:/leo.repo/leo-editor/leo/core/leoPy.leo' Traceback (most recent cal...
FileNotFoundError
def writePathChanged(self, p): """ raise IOError if p's path has changed *and* user forbids the write. """ at, c = self, self.c # # Suppress this message during save-as and save-to commands. if c.ignoreChangedPaths: return oldPath = g.os_path_normcase(at.getPathUa(p)) newPath...
def writePathChanged(self, p): """ raise IOError if p's path has changed *and* user forbids the write. """ at, c = self, self.c # # Suppress this message during save-as and save-to commands. if c.ignoreChangedPaths: return oldPath = g.os_path_normcase(at.getPathUa(p)) newPath...
https://github.com/leo-editor/leo-editor/issues/1519
(base) c:\leo.repo\leo-editor>python c:\leo.repo\leo-editor\launchLeo.py --gui=qttabs --gui=qttabs leo\core\leoPy.leo leo\plugins\leoPlugins.leo Leo 6.2-b1-devel, devel branch, build 5da736ea4d 2020-02-29 06:19:36 -0600 Unexpected exception reading 'c:/leo.repo/leo-editor/leo/core/leoPy.leo' Traceback (most recent cal...
FileNotFoundError
def shouldPromptForDangerousWrite(self, fn, p): """ Return True if Leo should warn the user that p is an @<file> node that was not read during startup. Writing that file might cause data loss. See #50: https://github.com/leo-editor/leo-editor/issues/50 """ trace = "save" in g.app.debug sfn ...
def shouldPromptForDangerousWrite(self, fn, p): """ Return True if Leo should warn the user that p is an @<file> node that was not read during startup. Writing that file might cause data loss. See #50: https://github.com/leo-editor/leo-editor/issues/50 """ trace = "save" in g.app.debug sfn ...
https://github.com/leo-editor/leo-editor/issues/1519
(base) c:\leo.repo\leo-editor>python c:\leo.repo\leo-editor\launchLeo.py --gui=qttabs --gui=qttabs leo\core\leoPy.leo leo\plugins\leoPlugins.leo Leo 6.2-b1-devel, devel branch, build 5da736ea4d 2020-02-29 06:19:36 -0600 Unexpected exception reading 'c:/leo.repo/leo-editor/leo/core/leoPy.leo' Traceback (most recent cal...
FileNotFoundError
def writeAsisNode(self, p): """Write the p's node to an @asis file.""" at = self def put(s): """Append s to self.output_list.""" # #1480: Avoid calling at.os(). s = g.toUnicode(s, at.encoding, reportErrors=True) at.outputList.append(s) # Write the headline only if it st...
def writeAsisNode(self, p): """Write the p's node to an @asis file.""" at = self # Write the headline only if it starts with '@@'. s = p.h if g.match(s, 0, "@@"): s = s[2:] if s: at.outputFile.write(s) # Write the body. s = p.b if s: s = g.toEncodedStr...
https://github.com/leo-editor/leo-editor/issues/1480
exception writing: C:/Users/jrhut/Documents/Active/My Maps/_foo.txt Traceback (most recent call last): File "C:\cygwin64\home\jrhut\src\leo-editor\leo-editor\leo\core\leoAtFile.py", line 1291, in asisWrite at.writeAsisNode(p) File "C:\cygwin64\home\jrhut\src\leo-editor\leo-editor\leo\core\leoAtFile.py", line 1307, in w...
AttributeError
def os(self, s): """ Append a string to at.outputList. All output produced by leoAtFile module goes here. """ at = self if s.startswith(self.underindentEscapeString): try: junk, s = at.parseUnderindentTag(s) except Exception: at.exception("exception writi...
def os(self, s): """ Write a string to the output file or stream. All output produced by leoAtFile module goes here. """ at = self if s.startswith(self.underindentEscapeString): try: junk, s = at.parseUnderindentTag(s) except Exception: at.exception("exce...
https://github.com/leo-editor/leo-editor/issues/1480
exception writing: C:/Users/jrhut/Documents/Active/My Maps/_foo.txt Traceback (most recent call last): File "C:\cygwin64\home\jrhut\src\leo-editor\leo-editor\leo\core\leoAtFile.py", line 1291, in asisWrite at.writeAsisNode(p) File "C:\cygwin64\home\jrhut\src\leo-editor\leo-editor\leo\core\leoAtFile.py", line 1307, in w...
AttributeError
def shouldPromptForDangerousWrite(self, fn, p): """ Return True if Leo should warn the user that p is an @<file> node that was not read during startup. Writing that file might cause data loss. See #50: https://github.com/leo-editor/leo-editor/issues/50 """ trace = "save" in g.app.debug sfn ...
def shouldPromptForDangerousWrite(self, fn, p): """ Return True if Leo should warn the user that p is an @<file> node that was not read during startup. Writing that file might cause data loss. See #50: https://github.com/leo-editor/leo-editor/issues/50 """ trace = "save" in g.app.debug sfn ...
https://github.com/leo-editor/leo-editor/issues/1469
exception writing: /tmp/pytest-of-btheado/pytest-85/test_save_after_external_file_0/1_renamed Traceback (most recent call last): File "/home/btheado/src/leo-editor/leo/core/leoAtFile.py", line 1323, in write if not fileName or not at.precheck(fileName, root): File "/home/btheado/src/leo-editor/leo/core/leoAtFile.py",...
FileNotFoundError
def bridge(self): """Return an instance of Leo's bridge.""" import leo.core.leoBridge as leoBridge return leoBridge.controller( gui="nullGui", loadPlugins=False, readSettings=False, silent=True, verbose=False, )
def bridge(self): import leo.core.leoBridge as leoBridge return leoBridge.controller( gui="nullGui", loadPlugins=False, readSettings=False, silent=False, verbose=False, )
https://github.com/leo-editor/leo-editor/issues/1469
exception writing: /tmp/pytest-of-btheado/pytest-85/test_save_after_external_file_0/1_renamed Traceback (most recent call last): File "/home/btheado/src/leo-editor/leo/core/leoAtFile.py", line 1323, in write if not fileName or not at.precheck(fileName, root): File "/home/btheado/src/leo-editor/leo/core/leoAtFile.py",...
FileNotFoundError
def create(self, fn): """Create the given file with empty contents.""" theDir = g.os_path_dirname(fn) # Make the directories as needed. ok = g.makeAllNonExistentDirectories(theDir, c=self.c, force=True, verbose=True) # #1453: Don't assume the directory exists. if not ok: g.error(f"did no...
def create(self, fn): """Create the given file with empty contents.""" theDir = g.os_path_dirname(fn) g.makeAllNonExistentDirectories(theDir, c=self.c, force=True, verbose=True) # Make the directories as needed. try: f = open(fn, mode="wb") f.close() g.note(f"created: {fn}") ...
https://github.com/leo-editor/leo-editor/issues/1453
Leo Log Window Leo 6.1-final, master branch, build b80e074204 2019-11-08 12:36:03 -0600 Python 3.8.0, PyQt version 5.13.0 Windows 10 AMD64 (build 10.0.17763) SP0 created directory: C:/Users/C050536/.leo leoID='metaperl' .leoID.txt created in C:/Users/C050536/.leo current dir: C:/bin/leo-editor load dir: C:/bin/leo-edit...
TypeError
def computeHomeLeoDir(self): # lm = self homeLeoDir = g.os_path_finalize_join(g.app.homeDir, ".leo") if g.os_path_exists(homeLeoDir): return homeLeoDir ok = g.makeAllNonExistentDirectories(homeLeoDir, force=True) return homeLeoDir if ok else "" # #1450
def computeHomeLeoDir(self): # lm = self homeLeoDir = g.os_path_finalize_join(g.app.homeDir, ".leo") if not g.os_path_exists(homeLeoDir): g.makeAllNonExistentDirectories(homeLeoDir, force=True) return homeLeoDir
https://github.com/leo-editor/leo-editor/issues/1453
Leo Log Window Leo 6.1-final, master branch, build b80e074204 2019-11-08 12:36:03 -0600 Python 3.8.0, PyQt version 5.13.0 Windows 10 AMD64 (build 10.0.17763) SP0 created directory: C:/Users/C050536/.leo leoID='metaperl' .leoID.txt created in C:/Users/C050536/.leo current dir: C:/bin/leo-editor load dir: C:/bin/leo-edit...
TypeError
def makeAllNonExistentDirectories(theDir, c=None, force=False, verbose=True): """ Attempt to make all non-existent directories. A wrapper from os.makedirs (new in Python 3.2). """ if force: create = True # Bug fix: g.app.config will not exist during startup. elif c: create = c...
def makeAllNonExistentDirectories(theDir, c=None, force=False, verbose=True): """Attempt to make all non-existent directories""" testing = False # True: don't actually make the directories. if force: create = True # Bug fix: g.app.config will not exist during startup. elif c: create = ...
https://github.com/leo-editor/leo-editor/issues/1453
Leo Log Window Leo 6.1-final, master branch, build b80e074204 2019-11-08 12:36:03 -0600 Python 3.8.0, PyQt version 5.13.0 Windows 10 AMD64 (build 10.0.17763) SP0 created directory: C:/Users/C050536/.leo leoID='metaperl' .leoID.txt created in C:/Users/C050536/.leo current dir: C:/bin/leo-editor load dir: C:/bin/leo-edit...
TypeError
def update_file_if_changed(c, file_name, temp_name): """Compares two files. If they are different, we replace file_name with temp_name. Otherwise, we just delete temp_name. Both files should be closed.""" if g.os_path_exists(file_name): if filecmp.cmp(temp_name, file_name): kind = "...
def update_file_if_changed(c, file_name, temp_name): """Compares two files. If they are different, we replace file_name with temp_name. Otherwise, we just delete temp_name. Both files should be closed.""" if g.os_path_exists(file_name): if filecmp.cmp(temp_name, file_name): kind = "...
https://github.com/leo-editor/leo-editor/issues/1453
Leo Log Window Leo 6.1-final, master branch, build b80e074204 2019-11-08 12:36:03 -0600 Python 3.8.0, PyQt version 5.13.0 Windows 10 AMD64 (build 10.0.17763) SP0 created directory: C:/Users/C050536/.leo leoID='metaperl' .leoID.txt created in C:/Users/C050536/.leo current dir: C:/bin/leo-editor load dir: C:/bin/leo-edit...
TypeError
def utils_rename(c, src, dst, verbose=True): """Platform independent rename.""" # Don't call g.makeAllNonExistentDirectories here! try: shutil.move(src, dst) return True except Exception: if verbose: g.error("exception renaming", src, "to", dst) g.es_excep...
def utils_rename(c, src, dst, verbose=True): """Platform independent rename.""" # Don't call g.makeAllNonExistentDirectories. # It's not right to do this here!! # head, tail = g.os_path_split(dst) # if head: g.makeAllNonExistentDirectories(head,c=c) try: shutil.move(src, dst) ret...
https://github.com/leo-editor/leo-editor/issues/1453
Leo Log Window Leo 6.1-final, master branch, build b80e074204 2019-11-08 12:36:03 -0600 Python 3.8.0, PyQt version 5.13.0 Windows 10 AMD64 (build 10.0.17763) SP0 created directory: C:/Users/C050536/.leo leoID='metaperl' .leoID.txt created in C:/Users/C050536/.leo current dir: C:/bin/leo-editor load dir: C:/bin/leo-edit...
TypeError
def create(self, fn): """Create the given file with empty contents.""" # Make the directories as needed. theDir = g.os_path_dirname(fn) if theDir: ok = g.makeAllNonExistentDirectories(theDir, c=self.c, force=True, verbose=True) # #1453: Don't assume the directory exists. if not o...
def create(self, fn): """Create the given file with empty contents.""" theDir = g.os_path_dirname(fn) # Make the directories as needed. ok = g.makeAllNonExistentDirectories(theDir, c=self.c, force=True, verbose=True) # #1453: Don't assume the directory exists. if not ok: g.error(f"did no...
https://github.com/leo-editor/leo-editor/issues/1453
Leo Log Window Leo 6.1-final, master branch, build b80e074204 2019-11-08 12:36:03 -0600 Python 3.8.0, PyQt version 5.13.0 Windows 10 AMD64 (build 10.0.17763) SP0 created directory: C:/Users/C050536/.leo leoID='metaperl' .leoID.txt created in C:/Users/C050536/.leo current dir: C:/bin/leo-editor load dir: C:/bin/leo-edit...
TypeError
def makeAllNonExistentDirectories(theDir, c=None, force=False, verbose=True): """ Attempt to make all non-existent directories. Return the created directory, or None. If c is given, support {{expressions}}. A wrapper from os.makedirs (new in Python 3.2). """ if force: # Bug fix: g...
def makeAllNonExistentDirectories(theDir, c=None, force=False, verbose=True): """ Attempt to make all non-existent directories. A wrapper from os.makedirs (new in Python 3.2). """ if force: create = True # Bug fix: g.app.config will not exist during startup. elif c: create = c...
https://github.com/leo-editor/leo-editor/issues/1453
Leo Log Window Leo 6.1-final, master branch, build b80e074204 2019-11-08 12:36:03 -0600 Python 3.8.0, PyQt version 5.13.0 Windows 10 AMD64 (build 10.0.17763) SP0 created directory: C:/Users/C050536/.leo leoID='metaperl' .leoID.txt created in C:/Users/C050536/.leo current dir: C:/bin/leo-editor load dir: C:/bin/leo-edit...
TypeError
def find_user_dict(self): """Return the full path to the local dictionary.""" c = self.c join = g.os_path_finalize_join table = ( c.config.getString("enchant-local-dictionary"), # Settings first. join(g.app.homeDir, ".leo", "spellpyx.txt"), # #108: then the .leo directory...
def find_user_dict(self): """Return the full path to the local dictionary.""" c = self.c table = ( c.config.getString("enchant-local-dictionary"), # Settings first. g.os_path_finalize_join(g.app.homeDir, ".leo", "spellpyx.txt"), # #108: then the .leo directory. g.os_p...
https://github.com/leo-editor/leo-editor/issues/1453
Leo Log Window Leo 6.1-final, master branch, build b80e074204 2019-11-08 12:36:03 -0600 Python 3.8.0, PyQt version 5.13.0 Windows 10 AMD64 (build 10.0.17763) SP0 created directory: C:/Users/C050536/.leo leoID='metaperl' .leoID.txt created in C:/Users/C050536/.leo current dir: C:/bin/leo-editor load dir: C:/bin/leo-edit...
TypeError
def write(self, root, sentinels=True): """Write a 4.x derived file. root is the position of an @<file> node. sentinels will be False for @clean and @nosent nodes. """ at, c = self, self.c try: c.endEditing() fileName = at.initWriteIvars( root, root.anyAtFileNodeName()...
def write(self, root, sentinels=True): """Write a 4.x derived file. root is the position of an @<file> node. sentinels will be False for @clean and @nosent nodes. """ at, c = self, self.c try: c.endEditing() fileName = at.initWriteIvars( root, root.anyAtFileNodeName()...
https://github.com/leo-editor/leo-editor/issues/1450
Traceback (most recent call last): File ".../leo/core/leoGlobals.py", line 293, in new_cmd_wrapper func(self, event=event) File ".../leo/core/leoFileCommands.py", line 1827, in writeMissingAtFileNodes c.atFileCommands.writeMissing(c.p) File ".../leo/core/leoAtFile.py", line 1327, in writeMissing at.default_directory...
AttributeError
def shouldPromptForDangerousWrite(self, fn, p): """ Return True if Leo should warn the user that p is an @<file> node that was not read during startup. Writing that file might cause data loss. See #50: https://github.com/leo-editor/leo-editor/issues/50 """ trace = "save" in g.app.debug sfn ...
def shouldPromptForDangerousWrite(self, fn, p): """ Return True if Leo should warn the user that p is an @<file> node that was not read during startup. Writing that file might cause data loss. See #50: https://github.com/leo-editor/leo-editor/issues/50 """ trace = "save" in g.app.debug sfn ...
https://github.com/leo-editor/leo-editor/issues/1450
Traceback (most recent call last): File ".../leo/core/leoGlobals.py", line 293, in new_cmd_wrapper func(self, event=event) File ".../leo/core/leoFileCommands.py", line 1827, in writeMissingAtFileNodes c.atFileCommands.writeMissing(c.p) File ".../leo/core/leoAtFile.py", line 1327, in writeMissing at.default_directory...
AttributeError
def get(self, key, default=None): if not self.has_key(key): return default try: val = self[key] return val except Exception: # #1444: Was KeyError. return default
def get(self, key, default=None): if not self.has_key(key): return default try: val = self[key] return val except KeyError: return default
https://github.com/leo-editor/leo-editor/issues/1444
hook failed: after-create-leo-frame2, <bound method FreeLayoutController.loadLayouts of <leo.plugins.free_layout.FreeLayoutController object at 0x00000248F6C65548>>, <no module> Traceback (most recent call last): File "C:\Documents and Settings\tom\leo-editor\leo\core\leoPlugins.py", line 324, in callTagHandler result...
ModuleNotFoundError
def computeWorkbookFileName(self): """ Return full path to the workbook. Return None if testing, or in batch mode, or if the containing directory does not exist. """ # lm = self # Never create a workbook during unit tests or in batch mode. if g.unitTesting or g.app.batchMode: re...
def computeWorkbookFileName(self): """ Return the name of the workbook. Return None *only* if: 1. The workbook does not exist. 2. We are unit testing or in batch mode. """ # lm = self fn = g.app.config.getString(setting="default_leo_file") # The default is ~/.leo/workbook.leo if...
https://github.com/leo-editor/leo-editor/issues/1415
unexpected exception loading session Traceback (most recent call last): File "c:\users\viktor\pyve\github\leo-dev-opt-b\devel\leo-editor-devel\leo\core\leoApp.py", line 2601, in doPostPluginsInit g.app.sessionManager.load_session(c1, aList) [...] File "c:\users\viktor\pyve\github\leo-dev-opt-b\devel\leo-editor-devel...
FileNotFoundError