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 __init__(self, schedulers, durations, save_history=False):
if not isinstance(schedulers, Sequence) or len(schedulers) < 2:
raise ValueError(
"Argument schedulers should be a sequence of more than one parameter schedulers, "
"but given {}".format(schedulers)
)
if not ... | def __init__(self, schedulers, durations, save_history=False):
if not isinstance(schedulers, Sequence) or len(schedulers) < 2:
raise ValueError(
"Argument schedulers should be a sequence of more than one parameter schedulers, "
"but given {}".format(schedulers)
)
if not ... | https://github.com/pytorch/ignite/issues/813 | Traceback (most recent call last):
File "tutorials/misc/lr_schedulers.py", line 56, in <module>
lr_values = LRScheduler.simulate_values(num_events=50, lr_scheduler=lr_scheduler)
File "/work/desrozis/Softwares/conda/envs/focus-light/lib/python3.7/site-packages/ignite/contrib/handlers/param_scheduler.py", line 606, in si... | TypeError |
def simulate_values(cls, num_events, schedulers, durations, param_names=None, **kwargs):
"""Method to simulate scheduled values during num_events events.
Args:
num_events (int): number of events during the simulation.
schedulers (list of ParamScheduler): list of parameter schedulers.
du... | def simulate_values(cls, num_events, schedulers, durations, param_names=None, **kwargs):
"""Method to simulate scheduled values during num_events events.
Args:
num_events (int): number of events during the simulation.
schedulers (list of ParamScheduler): list of parameter schedulers.
du... | https://github.com/pytorch/ignite/issues/813 | Traceback (most recent call last):
File "tutorials/misc/lr_schedulers.py", line 56, in <module>
lr_values = LRScheduler.simulate_values(num_events=50, lr_scheduler=lr_scheduler)
File "/work/desrozis/Softwares/conda/envs/focus-light/lib/python3.7/site-packages/ignite/contrib/handlers/param_scheduler.py", line 606, in si... | TypeError |
def __init__(self, lr_scheduler, save_history=False, **kwargs):
if not isinstance(lr_scheduler, _LRScheduler):
raise TypeError(
"Argument lr_scheduler should be a subclass of torch.optim.lr_scheduler._LRScheduler, "
"but given {}".format(type(lr_scheduler))
)
self.lr_sch... | def __init__(self, lr_scheduler, save_history=False, **kwds):
if not isinstance(lr_scheduler, _LRScheduler):
raise TypeError(
"Argument lr_scheduler should be a subclass of torch.optim.lr_scheduler._LRScheduler, "
"but given {}".format(type(lr_scheduler))
)
self.lr_sched... | https://github.com/pytorch/ignite/issues/813 | Traceback (most recent call last):
File "tutorials/misc/lr_schedulers.py", line 56, in <module>
lr_values = LRScheduler.simulate_values(num_events=50, lr_scheduler=lr_scheduler)
File "/work/desrozis/Softwares/conda/envs/focus-light/lib/python3.7/site-packages/ignite/contrib/handlers/param_scheduler.py", line 606, in si... | TypeError |
def simulate_values(cls, num_events, lr_scheduler, **kwargs):
"""Method to simulate scheduled values during num_events events.
Args:
num_events (int): number of events during the simulation.
lr_scheduler (subclass of `torch.optim.lr_scheduler._LRScheduler`): lr_scheduler object to wrap.
Re... | def simulate_values(cls, num_events, lr_scheduler, **kwargs):
"""Method to simulate scheduled values during num_events events.
Args:
num_events (int): number of events during the simulation.
lr_scheduler (subclass of `torch.optim.lr_scheduler._LRScheduler`): lr_scheduler object to wrap.
Re... | https://github.com/pytorch/ignite/issues/813 | Traceback (most recent call last):
File "tutorials/misc/lr_schedulers.py", line 56, in <module>
lr_values = LRScheduler.simulate_values(num_events=50, lr_scheduler=lr_scheduler)
File "/work/desrozis/Softwares/conda/envs/focus-light/lib/python3.7/site-packages/ignite/contrib/handlers/param_scheduler.py", line 606, in si... | TypeError |
def create_lr_scheduler_with_warmup(
lr_scheduler,
warmup_start_value,
warmup_duration,
warmup_end_value=None,
save_history=False,
output_simulated_values=None,
):
"""
Helper method to create a learning rate scheduler with a linear warm-up.
Args:
lr_scheduler (ParamScheduler... | def create_lr_scheduler_with_warmup(
lr_scheduler,
warmup_start_value,
warmup_duration,
warmup_end_value=None,
save_history=False,
output_simulated_values=None,
):
"""
Helper method to create a learning rate scheduler with a linear warm-up.
Args:
lr_scheduler (ParamScheduler... | https://github.com/pytorch/ignite/issues/813 | Traceback (most recent call last):
File "tutorials/misc/lr_schedulers.py", line 56, in <module>
lr_values = LRScheduler.simulate_values(num_events=50, lr_scheduler=lr_scheduler)
File "/work/desrozis/Softwares/conda/envs/focus-light/lib/python3.7/site-packages/ignite/contrib/handlers/param_scheduler.py", line 606, in si... | TypeError |
def __init__(
self,
schedulers: List[ParamScheduler],
names: Optional[List[str]] = None,
save_history=False,
):
if not (
isinstance(schedulers, Sequence)
and all(isinstance(scheduler, ParamScheduler) for scheduler in schedulers)
):
raise ValueError(
"Argument ... | def __init__(
self,
schedulers: List[ParamScheduler],
names: Optional[List[str]] = None,
save_history=False,
):
if not (
isinstance(schedulers, Sequence)
and all(isinstance(scheduler, ParamScheduler) for scheduler in schedulers)
):
raise ValueError(
"Argument ... | https://github.com/pytorch/ignite/issues/813 | Traceback (most recent call last):
File "tutorials/misc/lr_schedulers.py", line 56, in <module>
lr_values = LRScheduler.simulate_values(num_events=50, lr_scheduler=lr_scheduler)
File "/work/desrozis/Softwares/conda/envs/focus-light/lib/python3.7/site-packages/ignite/contrib/handlers/param_scheduler.py", line 606, in si... | TypeError |
def simulate_values(cls, num_events, schedulers, **kwargs):
"""Method to simulate scheduled values during num_events events.
Args:
num_events (int): number of events during the simulation.
lr_schedulers (subclass of `torch.optim.lr_scheduler._LRScheduler`): lr_scheduler object to wrap.
Ret... | def simulate_values(cls, num_events, schedulers, **kwargs):
"""Method to simulate scheduled values during num_events events.
Args:
num_events (int): number of events during the simulation.
lr_schedulers (subclass of `torch.optim.lr_scheduler._LRScheduler`): lr_scheduler object to wrap.
Ret... | https://github.com/pytorch/ignite/issues/813 | Traceback (most recent call last):
File "tutorials/misc/lr_schedulers.py", line 56, in <module>
lr_values = LRScheduler.simulate_values(num_events=50, lr_scheduler=lr_scheduler)
File "/work/desrozis/Softwares/conda/envs/focus-light/lib/python3.7/site-packages/ignite/contrib/handlers/param_scheduler.py", line 606, in si... | TypeError |
def _handler_wrapper(
self, handler: Callable, event_name: Any, event_filter: Callable
) -> Callable:
# signature of the following wrapper will be inspected during registering to check if engine is necessary
# we have to build a wrapper with relevant signature : solution is functools.wrapsgit s
@functoo... | def _handler_wrapper(
handler: Callable, event_name: Any, event_filter: Callable
) -> Callable:
def wrapper(engine: Engine, *args, **kwargs) -> Any:
event = engine.state.get_event_attrib_value(event_name)
if event_filter(engine, event):
return handler(engine, *args, **kwargs)
# ... | https://github.com/pytorch/ignite/issues/918 | TypeErrorTraceback (most recent call last)
<ipython-input-13-832efed482dd> in <module>
14
15 e.add_event_handler(Events.ITERATION_COMPLETED(every=2), f4)
---> 16 e.fire_event(Events.ITERATION_COMPLETED)
17 e.fire_event(Events.ITERATION_COMPLETED)
/opt/conda/lib/python3.7/site-packages/ignite/engine/engine.py in fire_e... | TypeError |
def wrapper(*args, **kwargs) -> Any:
event = self.state.get_event_attrib_value(event_name)
if event_filter(self, event):
return handler(*args, **kwargs)
| def wrapper(engine: Engine, *args, **kwargs) -> Any:
event = engine.state.get_event_attrib_value(event_name)
if event_filter(engine, event):
return handler(engine, *args, **kwargs)
| https://github.com/pytorch/ignite/issues/918 | TypeErrorTraceback (most recent call last)
<ipython-input-13-832efed482dd> in <module>
14
15 e.add_event_handler(Events.ITERATION_COMPLETED(every=2), f4)
---> 16 e.fire_event(Events.ITERATION_COMPLETED)
17 e.fire_event(Events.ITERATION_COMPLETED)
/opt/conda/lib/python3.7/site-packages/ignite/engine/engine.py in fire_e... | TypeError |
def add_event_handler(self, event_name: Any, handler: Callable, *args, **kwargs):
"""Add an event handler to be executed when the specified event is fired.
Args:
event_name: An event or a list of events to attach the handler. Valid events are
from :class:`~ignite.engine.Events` or any `even... | def add_event_handler(self, event_name: Any, handler: Callable, *args, **kwargs):
"""Add an event handler to be executed when the specified event is fired.
Args:
event_name: An event or a list of events to attach the handler. Valid events are
from :class:`~ignite.engine.Events` or any `even... | https://github.com/pytorch/ignite/issues/918 | TypeErrorTraceback (most recent call last)
<ipython-input-13-832efed482dd> in <module>
14
15 e.add_event_handler(Events.ITERATION_COMPLETED(every=2), f4)
---> 16 e.fire_event(Events.ITERATION_COMPLETED)
17 e.fire_event(Events.ITERATION_COMPLETED)
/opt/conda/lib/python3.7/site-packages/ignite/engine/engine.py in fire_e... | TypeError |
def print_results(results):
"""
Method to print the aggregated results from the profiler
.. code-block:: python
profiler.print_results(results)
Example output:
.. code-block:: text
--------------------------------------------
- Time profiling results:
-----------... | def print_results(results):
"""
Method to print the aggregated results from the profiler
.. code-block:: python
profiler.print_results(results)
Example output:
.. code-block:: text
--------------------------------------------
- Time profiling results:
-----------... | https://github.com/pytorch/ignite/issues/814 | OrderedDict([('processing_stats', OrderedDict([('min/index', (0.002581869950518012, 937)), ('max/index', (0.24407817423343658, 0)), ('mean', 0.005071939900517464), ('std', 0.005763144697993994), ('total', 9.514959335327148)])), ('dataflow_stats', OrderedDict([('min/index', (5.4130003263708204e-05, 1874)), ('max/index',... | KeyError |
def __init__(self, event: Any, filter: Callable):
if not callable(filter):
raise TypeError("Argument filter should be callable")
self.event = event
self.filter = filter
| def __init__(self, event: CallableEvents, filter: Callable):
if not callable(filter):
raise TypeError("Argument filter should be callable")
self.event = event
self.filter = filter
| https://github.com/pytorch/ignite/issues/752 | root@user:/# pip install --pre pytorch-ignite
Successfully installed pytorch-ignite-0.4.0.dev20200129
root@user:/#
root@user:/# python -c "import ignite"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/envs/py35/lib/python3.5/site-packages/ignite/__init__.py", line 1, in <module... | SyntaxError |
def __call__(
self,
event_filter: Optional[Callable] = None,
every: Optional[int] = None,
once: Optional[int] = None,
):
if not ((event_filter is not None) ^ (every is not None) ^ (once is not None)):
raise ValueError("Only one of the input arguments should be specified")
if (event_filt... | def __call__(
self,
event_filter: Optional[Callable] = None,
every: Optional[int] = None,
once: Optional[int] = None,
) -> Union[CallableEvents, EventWithFilter]:
if not ((event_filter is not None) ^ (every is not None) ^ (once is not None)):
raise ValueError("Only one of the input arguments... | https://github.com/pytorch/ignite/issues/752 | root@user:/# pip install --pre pytorch-ignite
Successfully installed pytorch-ignite-0.4.0.dev20200129
root@user:/#
root@user:/# python -c "import ignite"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/envs/py35/lib/python3.5/site-packages/ignite/__init__.py", line 1, in <module... | SyntaxError |
def __enter__(self):
return self
| def __enter__(self) -> RemovableEventHandle:
return self
| https://github.com/pytorch/ignite/issues/752 | root@user:/# pip install --pre pytorch-ignite
Successfully installed pytorch-ignite-0.4.0.dev20200129
root@user:/#
root@user:/# python -c "import ignite"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/envs/py35/lib/python3.5/site-packages/ignite/__init__.py", line 1, in <module... | SyntaxError |
def attach(
self,
engine: Engine,
start: str = Events.STARTED,
pause: str = Events.COMPLETED,
resume: Optional[str] = None,
step: Optional[str] = None,
):
"""Register callbacks to control the timer.
Args:
engine (Engine):
Engine that this timer will be attached to.
... | def attach(
self,
engine: Engine,
start: str = Events.STARTED,
pause: str = Events.COMPLETED,
resume: Optional[str] = None,
step: Optional[str] = None,
) -> Timer:
"""Register callbacks to control the timer.
Args:
engine (Engine):
Engine that this timer will be attac... | https://github.com/pytorch/ignite/issues/752 | root@user:/# pip install --pre pytorch-ignite
Successfully installed pytorch-ignite-0.4.0.dev20200129
root@user:/#
root@user:/# python -c "import ignite"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/envs/py35/lib/python3.5/site-packages/ignite/__init__.py", line 1, in <module... | SyntaxError |
def reset(self, *args):
self.__init__(self._average)
return self
| def reset(self, *args) -> Timer:
self.__init__(self._average)
return self
| https://github.com/pytorch/ignite/issues/752 | root@user:/# pip install --pre pytorch-ignite
Successfully installed pytorch-ignite-0.4.0.dev20200129
root@user:/#
root@user:/# python -c "import ignite"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/envs/py35/lib/python3.5/site-packages/ignite/__init__.py", line 1, in <module... | SyntaxError |
def __add__(self, other):
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x + y, self, other)
| def __add__(self, other: Metric) -> Metric:
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x + y, self, other)
| https://github.com/pytorch/ignite/issues/752 | root@user:/# pip install --pre pytorch-ignite
Successfully installed pytorch-ignite-0.4.0.dev20200129
root@user:/#
root@user:/# python -c "import ignite"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/envs/py35/lib/python3.5/site-packages/ignite/__init__.py", line 1, in <module... | SyntaxError |
def __radd__(self, other):
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x + y, other, self)
| def __radd__(self, other: Metric) -> Metric:
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x + y, other, self)
| https://github.com/pytorch/ignite/issues/752 | root@user:/# pip install --pre pytorch-ignite
Successfully installed pytorch-ignite-0.4.0.dev20200129
root@user:/#
root@user:/# python -c "import ignite"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/envs/py35/lib/python3.5/site-packages/ignite/__init__.py", line 1, in <module... | SyntaxError |
def __sub__(self, other):
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x - y, self, other)
| def __sub__(self, other: Metric) -> Metric:
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x - y, self, other)
| https://github.com/pytorch/ignite/issues/752 | root@user:/# pip install --pre pytorch-ignite
Successfully installed pytorch-ignite-0.4.0.dev20200129
root@user:/#
root@user:/# python -c "import ignite"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/envs/py35/lib/python3.5/site-packages/ignite/__init__.py", line 1, in <module... | SyntaxError |
def __rsub__(self, other):
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x - y, other, self)
| def __rsub__(self, other: Metric) -> Metric:
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x - y, other, self)
| https://github.com/pytorch/ignite/issues/752 | root@user:/# pip install --pre pytorch-ignite
Successfully installed pytorch-ignite-0.4.0.dev20200129
root@user:/#
root@user:/# python -c "import ignite"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/envs/py35/lib/python3.5/site-packages/ignite/__init__.py", line 1, in <module... | SyntaxError |
def __mul__(self, other):
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x * y, self, other)
| def __mul__(self, other: Metric) -> Metric:
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x * y, self, other)
| https://github.com/pytorch/ignite/issues/752 | root@user:/# pip install --pre pytorch-ignite
Successfully installed pytorch-ignite-0.4.0.dev20200129
root@user:/#
root@user:/# python -c "import ignite"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/envs/py35/lib/python3.5/site-packages/ignite/__init__.py", line 1, in <module... | SyntaxError |
def __rmul__(self, other):
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x * y, other, self)
| def __rmul__(self, other: Metric) -> Metric:
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x * y, other, self)
| https://github.com/pytorch/ignite/issues/752 | root@user:/# pip install --pre pytorch-ignite
Successfully installed pytorch-ignite-0.4.0.dev20200129
root@user:/#
root@user:/# python -c "import ignite"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/envs/py35/lib/python3.5/site-packages/ignite/__init__.py", line 1, in <module... | SyntaxError |
def __pow__(self, other):
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x**y, self, other)
| def __pow__(self, other: Metric) -> Metric:
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x**y, self, other)
| https://github.com/pytorch/ignite/issues/752 | root@user:/# pip install --pre pytorch-ignite
Successfully installed pytorch-ignite-0.4.0.dev20200129
root@user:/#
root@user:/# python -c "import ignite"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/envs/py35/lib/python3.5/site-packages/ignite/__init__.py", line 1, in <module... | SyntaxError |
def __rpow__(self, other):
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x**y, other, self)
| def __rpow__(self, other: Metric) -> Metric:
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x**y, other, self)
| https://github.com/pytorch/ignite/issues/752 | root@user:/# pip install --pre pytorch-ignite
Successfully installed pytorch-ignite-0.4.0.dev20200129
root@user:/#
root@user:/# python -c "import ignite"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/envs/py35/lib/python3.5/site-packages/ignite/__init__.py", line 1, in <module... | SyntaxError |
def __mod__(self, other):
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x % y, self, other)
| def __mod__(self, other: Metric) -> Metric:
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x % y, self, other)
| https://github.com/pytorch/ignite/issues/752 | root@user:/# pip install --pre pytorch-ignite
Successfully installed pytorch-ignite-0.4.0.dev20200129
root@user:/#
root@user:/# python -c "import ignite"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/envs/py35/lib/python3.5/site-packages/ignite/__init__.py", line 1, in <module... | SyntaxError |
def __div__(self, other):
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x.__div__(y), self, other)
| def __div__(self, other: Metric) -> Metric:
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x.__div__(y), self, other)
| https://github.com/pytorch/ignite/issues/752 | root@user:/# pip install --pre pytorch-ignite
Successfully installed pytorch-ignite-0.4.0.dev20200129
root@user:/#
root@user:/# python -c "import ignite"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/envs/py35/lib/python3.5/site-packages/ignite/__init__.py", line 1, in <module... | SyntaxError |
def __rdiv__(self, other):
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x.__div__(y), other, self)
| def __rdiv__(self, other: Metric) -> Metric:
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x.__div__(y), other, self)
| https://github.com/pytorch/ignite/issues/752 | root@user:/# pip install --pre pytorch-ignite
Successfully installed pytorch-ignite-0.4.0.dev20200129
root@user:/#
root@user:/# python -c "import ignite"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/envs/py35/lib/python3.5/site-packages/ignite/__init__.py", line 1, in <module... | SyntaxError |
def __truediv__(self, other):
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x.__truediv__(y), self, other)
| def __truediv__(self, other: Metric) -> Metric:
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x.__truediv__(y), self, other)
| https://github.com/pytorch/ignite/issues/752 | root@user:/# pip install --pre pytorch-ignite
Successfully installed pytorch-ignite-0.4.0.dev20200129
root@user:/#
root@user:/# python -c "import ignite"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/envs/py35/lib/python3.5/site-packages/ignite/__init__.py", line 1, in <module... | SyntaxError |
def __rtruediv__(self, other):
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x.__truediv__(y), other, self)
| def __rtruediv__(self, other: Metric) -> Metric:
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x.__truediv__(y), other, self)
| https://github.com/pytorch/ignite/issues/752 | root@user:/# pip install --pre pytorch-ignite
Successfully installed pytorch-ignite-0.4.0.dev20200129
root@user:/#
root@user:/# python -c "import ignite"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/envs/py35/lib/python3.5/site-packages/ignite/__init__.py", line 1, in <module... | SyntaxError |
def __floordiv__(self, other):
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x // y, self, other)
| def __floordiv__(self, other: Metric) -> Metric:
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x, y: x // y, self, other)
| https://github.com/pytorch/ignite/issues/752 | root@user:/# pip install --pre pytorch-ignite
Successfully installed pytorch-ignite-0.4.0.dev20200129
root@user:/#
root@user:/# python -c "import ignite"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/envs/py35/lib/python3.5/site-packages/ignite/__init__.py", line 1, in <module... | SyntaxError |
def __getitem__(self, index: Any):
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x: x[index], self)
| def __getitem__(self, index: Any) -> Metric:
from ignite.metrics import MetricsLambda
return MetricsLambda(lambda x: x[index], self)
| https://github.com/pytorch/ignite/issues/752 | root@user:/# pip install --pre pytorch-ignite
Successfully installed pytorch-ignite-0.4.0.dev20200129
root@user:/#
root@user:/# python -c "import ignite"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/conda/envs/py35/lib/python3.5/site-packages/ignite/__init__.py", line 1, in <module... | SyntaxError |
def _setup_engine(self):
try:
self._dataloader_len = (
len(self.state.dataloader)
if hasattr(self.state.dataloader, "__len__")
else None
)
except TypeError:
# _InfiniteConstantSampler can raise a TypeError on DataLoader length of a IterableDataset
... | def _setup_engine(self):
try:
self._dataloader_len = (
len(self.state.dataloader)
if hasattr(self.state.dataloader, "__len__")
else None
)
except TypeError:
# _InfiniteConstantSampler can raise a TypeError on DataLoader length of a IterableDataset
... | https://github.com/pytorch/ignite/issues/714 | ValueErrorTraceback (most recent call last)
<ipython-input-19-1c8004fbf46e> in <module>
21
22 engine = Engine(foo)
---> 23 engine.run(data_loader, epoch_length=10)
/opt/conda/lib/python3.7/site-packages/ignite/engine/engine.py in run(self, data, max_epochs, epoch_length, seed)
848
849 self.state.dataloader = d... | ValueError |
def _from_iteration(data, iteration):
if isinstance(data, torch.utils.data.DataLoader):
try:
# following is unsafe for IterableDatasets
iteration %= len(data.batch_sampler)
if iteration > 0:
# batch sampler is ReproducibleBatchSampler
data.... | def _from_iteration(data, iteration, epoch_length):
if isinstance(data, torch.utils.data.DataLoader):
iteration %= len(data.batch_sampler)
if iteration > 0:
# batch sampler is ReproducibleBatchSampler
data.batch_sampler.start_iteration = iteration
data_iter = iter(dat... | https://github.com/pytorch/ignite/issues/714 | ValueErrorTraceback (most recent call last)
<ipython-input-19-1c8004fbf46e> in <module>
21
22 engine = Engine(foo)
---> 23 engine.run(data_loader, epoch_length=10)
/opt/conda/lib/python3.7/site-packages/ignite/engine/engine.py in run(self, data, max_epochs, epoch_length, seed)
848
849 self.state.dataloader = d... | ValueError |
def __call__(self, engine, logger, event_name):
if not isinstance(logger, TensorboardLogger):
raise RuntimeError(
"Handler 'WeightsScalarHandler' works only with TensorboardLogger"
)
global_step = engine.state.get_event_attrib_value(event_name)
for name, p in self.model.named_pa... | def __call__(self, engine, logger, event_name):
if not isinstance(logger, TensorboardLogger):
raise RuntimeError(
"Handler 'WeightsScalarHandler' works only with TensorboardLogger"
)
global_step = engine.state.get_event_attrib_value(event_name)
for name, p in self.model.named_pa... | https://github.com/pytorch/ignite/issues/514 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-3-5ffffec84f3c> in <module>
65 print("Done.")
66
---> 67 example()
<ipython-input-3-5ffffec84f3c> in example()
62
63
---> 64 trainer.run(DataLoa... | AttributeError |
def __call__(self, engine, logger, event_name):
if not isinstance(logger, TensorboardLogger):
raise RuntimeError(
"Handler 'WeightsHistHandler' works only with TensorboardLogger"
)
global_step = engine.state.get_event_attrib_value(event_name)
for name, p in self.model.named_para... | def __call__(self, engine, logger, event_name):
if not isinstance(logger, TensorboardLogger):
raise RuntimeError(
"Handler 'WeightsHistHandler' works only with TensorboardLogger"
)
global_step = engine.state.get_event_attrib_value(event_name)
for name, p in self.model.named_para... | https://github.com/pytorch/ignite/issues/514 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-3-5ffffec84f3c> in <module>
65 print("Done.")
66
---> 67 example()
<ipython-input-3-5ffffec84f3c> in example()
62
63
---> 64 trainer.run(DataLoa... | AttributeError |
def __call__(self, engine, logger, event_name):
if not isinstance(logger, TensorboardLogger):
raise RuntimeError(
"Handler 'GradsScalarHandler' works only with TensorboardLogger"
)
global_step = engine.state.get_event_attrib_value(event_name)
for name, p in self.model.named_para... | def __call__(self, engine, logger, event_name):
if not isinstance(logger, TensorboardLogger):
raise RuntimeError(
"Handler 'GradsScalarHandler' works only with TensorboardLogger"
)
global_step = engine.state.get_event_attrib_value(event_name)
for name, p in self.model.named_para... | https://github.com/pytorch/ignite/issues/514 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-3-5ffffec84f3c> in <module>
65 print("Done.")
66
---> 67 example()
<ipython-input-3-5ffffec84f3c> in example()
62
63
---> 64 trainer.run(DataLoa... | AttributeError |
def __call__(self, engine, logger, event_name):
if not isinstance(logger, TensorboardLogger):
raise RuntimeError(
"Handler 'GradsHistHandler' works only with TensorboardLogger"
)
global_step = engine.state.get_event_attrib_value(event_name)
for name, p in self.model.named_parame... | def __call__(self, engine, logger, event_name):
if not isinstance(logger, TensorboardLogger):
raise RuntimeError(
"Handler 'GradsHistHandler' works only with TensorboardLogger"
)
global_step = engine.state.get_event_attrib_value(event_name)
for name, p in self.model.named_parame... | https://github.com/pytorch/ignite/issues/514 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-3-5ffffec84f3c> in <module>
65 print("Done.")
66
---> 67 example()
<ipython-input-3-5ffffec84f3c> in example()
62
63
---> 64 trainer.run(DataLoa... | AttributeError |
def _close(self, engine):
if self.pbar:
self.pbar.close()
self.pbar = None
| def _close(self, engine):
self.pbar.close()
self.pbar = None
| https://github.com/pytorch/ignite/issues/499 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-36-b4ac10e6ccc4> in <module>
----> 1 trainer.run(train_ab_loader, max_epochs=200)
/opt/conda/lib/python3.7/site-packages/ignite/engine/engine.py in run(... | AttributeError |
def _save(self, obj, path):
if not self._atomic:
torch.save(obj, path)
else:
tmp = tempfile.NamedTemporaryFile(delete=False, dir=self._dirname)
try:
torch.save(obj, tmp.file)
except BaseException:
tmp.close()
os.remove(tmp.name)
... | def _save(self, obj, path):
if not self._atomic:
torch.save(obj, path)
else:
tmp = tempfile.NamedTemporaryFile(delete=False)
try:
torch.save(obj, tmp.file)
except BaseException:
tmp.close()
os.remove(tmp.name)
raise
else... | https://github.com/pytorch/ignite/issues/114 | Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/ignite-0.1.0a1-py3.5.egg/ignite/engines/trainer.py", line 53, in run
self._handle_exception(state, e)
File "/usr/local/lib/python3.5/dist-packages/ignite-0.1.0a1-py3.5.egg/ignite/engines/engine.py", line 138, in _handle_exception
raise e
Fi... | OSError |
def init():
logger = logging.getLogger(__name__)
global __HTTP
proxy_url = os.getenv("http_proxy")
if proxy_url and len(proxy_url) > 0:
parsed_url = urllib3.util.parse_url(proxy_url)
logger.info(
"Connecting via proxy URL [%s] to the Internet (picked up from the env variable ... | def init():
logger = logging.getLogger(__name__)
global __HTTP
proxy_url = os.getenv("http_proxy")
if proxy_url and len(proxy_url) > 0:
logger.info(
"Rally connects via proxy URL [%s] to the Internet (picked up from the environment variable [http_proxy]).",
proxy_url,
... | https://github.com/elastic/rally/issues/636 | 2019-01-23 15:19:43,262 -not-actor-/PID:16740 esrally.utils.net INFO Rally connects via proxy URL [http://username:pw@1.2.3.4:8080] to the Internet (picked up from the environment variable [http_proxy]).
2019-01-23 15:19:43,263 -not-actor-/PID:16740 esrally.utils.net DEBUG Checking for internet connection against [http... | OSError |
def load(self):
config = configparser.ConfigParser()
config.read(self.location, encoding="utf-8")
return config
| def load(self, interpolation=configparser.ExtendedInterpolation()):
config = configparser.ConfigParser(interpolation=interpolation)
config.read(self.location, encoding="utf-8")
return config
| https://github.com/elastic/rally/issues/519 | Traceback (most recent call last):
File "/usr/local/bin/esrally", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/esrally/rally.py", line 588, in main
ensure_configuration_present(cfg, args, sub_command)
File "/usr/local/lib/python3.6/site-packages/esrally/rally.py", line 428, in ensu... | esrally.config.ConfigError |
def create_config(self, config_file, advanced_config=False, assume_defaults=False):
"""
Either creates a new configuration file or overwrites an existing one. Will ask the user for input on configurable properties
and writes them to the configuration file in ~/.rally/rally.ini.
:param config_file:
... | def create_config(self, config_file, advanced_config=False, assume_defaults=False):
"""
Either creates a new configuration file or overwrites an existing one. Will ask the user for input on configurable properties
and writes them to the configuration file in ~/.rally/rally.ini.
:param config_file:
... | https://github.com/elastic/rally/issues/519 | Traceback (most recent call last):
File "/usr/local/bin/esrally", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/esrally/rally.py", line 588, in main
ensure_configuration_present(cfg, args, sub_command)
File "/usr/local/lib/python3.6/site-packages/esrally/rally.py", line 428, in ensu... | esrally.config.ConfigError |
def migrate(config_file, current_version, target_version, out=print, i=input):
logger = logging.getLogger(__name__)
if current_version < Config.EARLIEST_SUPPORTED_VERSION:
raise ConfigError(
"The config file in {} is too old. Please delete it and reconfigure Rally from scratch with {} config... | def migrate(config_file, current_version, target_version, out=print, i=input):
logger = logging.getLogger(__name__)
if current_version < Config.EARLIEST_SUPPORTED_VERSION:
raise ConfigError(
"The config file in {} is too old. Please delete it and reconfigure Rally from scratch with {} config... | https://github.com/elastic/rally/issues/519 | Traceback (most recent call last):
File "/usr/local/bin/esrally", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/esrally/rally.py", line 588, in main
ensure_configuration_present(cfg, args, sub_command)
File "/usr/local/lib/python3.6/site-packages/esrally/rally.py", line 428, in ensu... | esrally.config.ConfigError |
def __init__(self, message: str) -> None:
super().__init__()
self.message = message
| def __init__(self, ledger):
self.ledger = ledger
| https://github.com/beancount/fava/issues/1095 | python3
Python 3.7.3 (default, Dec 20 2019, 18:57:59)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
from fava.ext import FavaExtensionBase
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/tbm/.local/lib/python3.7/site-packages/fava/ext/__in... | ImportError |
def generate_bql_grammar_json():
"""Generate a JSON file with BQL grammar attributes.
The online code editor needs to have the list of available columns,
functions, and keywords for syntax highlighting and completion.
Should be run whenever the BQL changes."""
target_env = query_env.TargetsEnviro... | def generate_bql_grammar_json():
"""Generate a JSON file with BQL grammar attributes.
The online code editor needs to have the list of available columns,
functions, and keywords for syntax highlighting and completion.
Should be run whenever the BQL changes."""
target_env = query_env.TargetsEnviro... | https://github.com/beancount/fava/issues/883 | D:\Documents\beancount>c:\Users\belidzs\PycharmProjects\beancount_virtualenv\Scripts\fava --debug fokonyv.beancount
* Serving Flask app "fava.application" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: ... | UnicodeDecodeError |
def insert_metadata_in_file(filename, lineno, key, value):
"""Inserts the specified metadata in the file below lineno, taking into
account the whitespace in front of the line that lineno."""
with open(filename, "r", encoding="utf-8") as file:
contents = file.readlines()
# use the whitespace of ... | def insert_metadata_in_file(filename, lineno, key, value):
"""Inserts the specified metadata in the file below lineno, taking into
account the whitespace in front of the line that lineno."""
with open(filename, "r") as file:
contents = file.readlines()
# use the whitespace of the following line... | https://github.com/beancount/fava/issues/883 | D:\Documents\beancount>c:\Users\belidzs\PycharmProjects\beancount_virtualenv\Scripts\fava --debug fokonyv.beancount
* Serving Flask app "fava.application" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: ... | UnicodeDecodeError |
def get_entry_slice(entry):
"""Get slice of the source file for an entry.
Args:
entry: An entry.
Returns:
A string containing the lines of the entry and the `sha256sum` of
these lines.
Raises:
FavaAPIException: If the file at `path` is not one of the
source... | def get_entry_slice(entry):
"""Get slice of the source file for an entry.
Args:
entry: An entry.
Returns:
A string containing the lines of the entry and the `sha256sum` of
these lines.
Raises:
FavaAPIException: If the file at `path` is not one of the
source... | https://github.com/beancount/fava/issues/883 | D:\Documents\beancount>c:\Users\belidzs\PycharmProjects\beancount_virtualenv\Scripts\fava --debug fokonyv.beancount
* Serving Flask app "fava.application" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: ... | UnicodeDecodeError |
def save_entry_slice(entry, source_slice, sha256sum):
"""Save slice of the source file for an entry.
Args:
entry: An entry.
source_slice: The lines that the entry should be replaced with.
sha256sum: The sha256sum of the current lines of the entry.
Returns:
The `sha256sum` o... | def save_entry_slice(entry, source_slice, sha256sum):
"""Save slice of the source file for an entry.
Args:
entry: An entry.
source_slice: The lines that the entry should be replaced with.
sha256sum: The sha256sum of the current lines of the entry.
Returns:
The `sha256sum` o... | https://github.com/beancount/fava/issues/883 | D:\Documents\beancount>c:\Users\belidzs\PycharmProjects\beancount_virtualenv\Scripts\fava --debug fokonyv.beancount
* Serving Flask app "fava.application" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: ... | UnicodeDecodeError |
def insert_entry(entry, filenames, fava_options):
"""Insert an entry.
Args:
entry: An entry.
filenames: List of filenames.
fava_options: The ledgers fava_options. Note that the line numbers of
the insert options might be updated.
"""
insert_options = fava_options.get... | def insert_entry(entry, filenames, fava_options):
"""Insert an entry.
Args:
entry: An entry.
filenames: List of filenames.
fava_options: The ledgers fava_options. Note that the line numbers of
the insert options might be updated.
"""
insert_options = fava_options.get... | https://github.com/beancount/fava/issues/883 | D:\Documents\beancount>c:\Users\belidzs\PycharmProjects\beancount_virtualenv\Scripts\fava --debug fokonyv.beancount
* Serving Flask app "fava.application" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: ... | UnicodeDecodeError |
def find_insert_position(accounts, date, insert_options, filenames):
"""Find insert position for an account.
Args:
accounts: A list of accounts.
date: A date. Only InsertOptions before this date will be considered.
insert_options: A list of InsertOption.
filenames: List of Beanc... | def find_insert_position(accounts, date, insert_options, filenames):
"""Find insert position for an account.
Args:
accounts: A list of accounts.
date: A date. Only InsertOptions before this date will be considered.
insert_options: A list of InsertOption.
filenames: List of Beanc... | https://github.com/beancount/fava/issues/883 | D:\Documents\beancount>c:\Users\belidzs\PycharmProjects\beancount_virtualenv\Scripts\fava --debug fokonyv.beancount
* Serving Flask app "fava.application" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: ... | UnicodeDecodeError |
def main(cwd=None):
"""
The main() function implements all of the logic that the command-line version of
onionshare uses.
"""
common = Common()
# Display OnionShare banner
print(f"OnionShare {common.version} | https://onionshare.org/")
reset = "\033[0m"
purple = "\33[95m"
print(... | def main(cwd=None):
"""
The main() function implements all of the logic that the command-line version of
onionshare uses.
"""
common = Common()
# Display OnionShare banner
print(f"OnionShare {common.version} | https://onionshare.org/")
reset = "\033[0m"
purple = "\33[95m"
print(... | https://github.com/micahflee/onionshare/issues/1283 | ERROR in app: Exception on / [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1926, in dispatch_request
self.raise_routing_exception(req)
... | AttributeError |
def define_routes(self):
"""
The web app routes for sharing files
"""
@self.web.app.route("/", defaults={"path": ""})
@self.web.app.route("/<path:path>")
def index(path):
"""
Render the template for the onionshare landing page.
"""
self.web.add_request(self.web.R... | def define_routes(self):
"""
The web app routes for sharing files
"""
@self.web.app.route("/", defaults={"path": ""})
@self.web.app.route("/<path:path>")
def index(path):
"""
Render the template for the onionshare landing page.
"""
self.web.add_request(self.web.R... | https://github.com/micahflee/onionshare/issues/1235 | [2020-11-25 11:14:20,333] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
File "/home/user/.cache/pypoetry/virtualenvs/onionshare-cli-c-YlJMZ4-py3.8/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/user/.cache/pypoetry/virtualenv... | TypeError |
def index(path):
"""
Render the template for the onionshare landing page.
"""
self.web.add_request(self.web.REQUEST_LOAD, request.path)
# Deny new downloads if "Stop sharing after files have been sent" is checked and there is
# currently a download
deny_download = (
self.web.setting... | def index(path):
"""
Render the template for the onionshare landing page.
"""
self.web.add_request(self.web.REQUEST_LOAD, request.path)
# Deny new downloads if "Stop sharing after files have been sent" is checked and there is
# currently a download
deny_download = (
self.web.setting... | https://github.com/micahflee/onionshare/issues/1235 | [2020-11-25 11:14:20,333] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
File "/home/user/.cache/pypoetry/virtualenvs/onionshare-cli-c-YlJMZ4-py3.8/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/user/.cache/pypoetry/virtualenv... | TypeError |
def download():
"""
Download the zip file.
"""
# Deny new downloads if "Stop After First Download" is checked and there is
# currently a download
deny_download = (
self.web.settings.get("share", "autostop_sharing") and self.download_in_progress
)
if deny_download:
r = mak... | def download():
"""
Download the zip file.
"""
# Deny new downloads if "Stop After First Download" is checked and there is
# currently a download
deny_download = (
self.web.settings.get("share", "autostop_sharing") and self.download_in_progress
)
if deny_download:
r = mak... | https://github.com/micahflee/onionshare/issues/1235 | [2020-11-25 11:14:20,333] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
File "/home/user/.cache/pypoetry/virtualenvs/onionshare-cli-c-YlJMZ4-py3.8/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/user/.cache/pypoetry/virtualenv... | TypeError |
def main(cwd=None):
"""
The main() function implements all of the logic that the command-line version of
onionshare uses.
"""
common = Common()
# Display OnionShare banner
print(f"OnionShare {common.version} | https://onionshare.org/")
reset = "\033[0m"
purple = "\33[95m"
print(... | def main(cwd=None):
"""
The main() function implements all of the logic that the command-line version of
onionshare uses.
"""
common = Common()
# Display OnionShare banner
print(f"OnionShare {common.version} | https://onionshare.org/")
reset = "\033[0m"
purple = "\33[95m"
print(... | https://github.com/micahflee/onionshare/issues/1237 | Traceback (most recent call last):
File "/Applications/OnionShare.app/Contents/Resources/app/onionshare/main_window.py", line 228, in open_settings
d = SettingsDialog(self.common)
File "/Applications/OnionShare.app/Contents/Resources/app/onionshare/settings_dialog.py", line 145, in __init__
) = self.common.get_tor_path... | TypeError |
def get_tor_paths(self):
if self.platform == "Linux":
tor_path = shutil.which("tor")
if not tor_path:
raise CannotFindTor()
obfs4proxy_file_path = shutil.which("obfs4proxy")
prefix = os.path.dirname(os.path.dirname(tor_path))
tor_geo_ip_file_path = os.path.join(pr... | def get_tor_paths(self):
if self.platform == "Linux":
tor_path = shutil.which("tor")
obfs4proxy_file_path = shutil.which("obfs4proxy")
prefix = os.path.dirname(os.path.dirname(tor_path))
tor_geo_ip_file_path = os.path.join(prefix, "share/tor/geoip")
tor_geo_ipv6_file_path = o... | https://github.com/micahflee/onionshare/issues/1237 | Traceback (most recent call last):
File "/Applications/OnionShare.app/Contents/Resources/app/onionshare/main_window.py", line 228, in open_settings
d = SettingsDialog(self.common)
File "/Applications/OnionShare.app/Contents/Resources/app/onionshare/settings_dialog.py", line 145, in __init__
) = self.common.get_tor_path... | TypeError |
def __init__(self, common):
super(SettingsDialog, self).__init__()
self.common = common
self.common.log("SettingsDialog", "__init__")
self.setModal(True)
self.setWindowTitle(strings._("gui_settings_window_title"))
self.setWindowIcon(QtGui.QIcon(GuiCommon.get_resource_path("images/logo.png")))... | def __init__(self, common):
super(SettingsDialog, self).__init__()
self.common = common
self.common.log("SettingsDialog", "__init__")
self.setModal(True)
self.setWindowTitle(strings._("gui_settings_window_title"))
self.setWindowIcon(QtGui.QIcon(GuiCommon.get_resource_path("images/logo.png")))... | https://github.com/micahflee/onionshare/issues/1237 | Traceback (most recent call last):
File "/Applications/OnionShare.app/Contents/Resources/app/onionshare/main_window.py", line 228, in open_settings
d = SettingsDialog(self.common)
File "/Applications/OnionShare.app/Contents/Resources/app/onionshare/settings_dialog.py", line 145, in __init__
) = self.common.get_tor_path... | TypeError |
def __init__(
self, common, onion, qtapp, app, filenames, config=False, local_only=False
):
super(OnionShareGui, self).__init__()
self.common = common
self.common.log("OnionShareGui", "__init__")
self.setMinimumWidth(820)
self.setMinimumHeight(660)
self.onion = onion
self.qtapp = qtapp... | def __init__(
self, common, onion, qtapp, app, filenames, config=False, local_only=False
):
super(OnionShareGui, self).__init__()
self.common = common
self.common.log("OnionShareGui", "__init__")
self.setMinimumWidth(820)
self.setMinimumHeight(660)
self.onion = onion
self.qtapp = qtapp... | https://github.com/micahflee/onionshare/issues/912 | Traceback (most recent call last):
File "onionshare_gui/settings_dialog.py", line 918, in help_clicked
AttributeError: 'bool' object has no attribute 'common'
Abort trap: 6 | AttributeError |
def define_routes(self):
"""
The web app routes for receiving files
"""
def index_logic():
self.web.add_request(self.web.REQUEST_LOAD, request.path)
if self.common.settings.get("public_mode"):
upload_action = "/upload"
else:
upload_action = "/{}/upload".... | def define_routes(self):
"""
The web app routes for receiving files
"""
def index_logic():
self.web.add_request(self.web.REQUEST_LOAD, request.path)
if self.common.settings.get("public_mode"):
upload_action = "/upload"
else:
upload_action = "/{}/upload".... | https://github.com/micahflee/onionshare/issues/866 | [Jan 07 2019 20:58:37] Onion.cleanup: trying to remove onion 5yym6w3kg4tof56umfy6a632nvtoc5dkkpkhj4zd2slqzp5wuiwml7yd
=> 2.4 MiB video 1.mov[Jan 07 2019 20:58:37] ReceiveMode.update_primary_action
Traceback (most recent call last):
File "onionshare_gui/onionshare_gui.py", line 382, in timer_callback
mode.handle... | KeyError |
def upload_logic(slug_candidate=""):
"""
Upload files.
"""
# Figure out what the receive mode dir should be
now = datetime.now()
date_dir = now.strftime("%Y-%m-%d")
time_dir = now.strftime("%H.%M.%S")
receive_mode_dir = os.path.join(
self.common.settings.get("data_dir"), date_dir... | def upload_logic(slug_candidate=""):
"""
Upload files.
"""
# Make sure the receive mode dir exists
now = datetime.now()
date_dir = now.strftime("%Y-%m-%d")
time_dir = now.strftime("%H.%M.%S")
receive_mode_dir = os.path.join(
self.common.settings.get("data_dir"), date_dir, time_di... | https://github.com/micahflee/onionshare/issues/866 | [Jan 07 2019 20:58:37] Onion.cleanup: trying to remove onion 5yym6w3kg4tof56umfy6a632nvtoc5dkkpkhj4zd2slqzp5wuiwml7yd
=> 2.4 MiB video 1.mov[Jan 07 2019 20:58:37] ReceiveMode.update_primary_action
Traceback (most recent call last):
File "onionshare_gui/onionshare_gui.py", line 382, in timer_callback
mode.handle... | KeyError |
def __call__(self, environ, start_response):
environ["web"] = self.web
environ["stop_q"] = self.web.stop_q
return self.app(environ, start_response)
| def __call__(self, environ, start_response):
environ["web"] = self.web
return self.app(environ, start_response)
| https://github.com/micahflee/onionshare/issues/866 | [Jan 07 2019 20:58:37] Onion.cleanup: trying to remove onion 5yym6w3kg4tof56umfy6a632nvtoc5dkkpkhj4zd2slqzp5wuiwml7yd
=> 2.4 MiB video 1.mov[Jan 07 2019 20:58:37] ReceiveMode.update_primary_action
Traceback (most recent call last):
File "onionshare_gui/onionshare_gui.py", line 382, in timer_callback
mode.handle... | KeyError |
def __init__(self, request, filename, write_func, close_func):
self.onionshare_request = request
self.onionshare_filename = filename
self.onionshare_write_func = write_func
self.onionshare_close_func = close_func
# Create a temporary file
self.f = tempfile.TemporaryFile("wb+")
# Make all t... | def __init__(self, filename, write_func, close_func):
self.onionshare_filename = filename
self.onionshare_write_func = write_func
self.onionshare_close_func = close_func
# Create a temporary file
self.f = tempfile.TemporaryFile("wb+")
# Make all the file-like methods and attributes actually ac... | https://github.com/micahflee/onionshare/issues/866 | [Jan 07 2019 20:58:37] Onion.cleanup: trying to remove onion 5yym6w3kg4tof56umfy6a632nvtoc5dkkpkhj4zd2slqzp5wuiwml7yd
=> 2.4 MiB video 1.mov[Jan 07 2019 20:58:37] ReceiveMode.update_primary_action
Traceback (most recent call last):
File "onionshare_gui/onionshare_gui.py", line 382, in timer_callback
mode.handle... | KeyError |
def write(self, b):
"""
Custom write method that calls out to onionshare_write_func
"""
if not self.onionshare_request.stop_q.empty():
self.close()
self.onionshare_request.close()
return
bytes_written = self.f.write(b)
self.onionshare_write_func(self.onionshare_filename,... | def write(self, b):
"""
Custom write method that calls out to onionshare_write_func
"""
bytes_written = self.f.write(b)
self.onionshare_write_func(self.onionshare_filename, bytes_written)
| https://github.com/micahflee/onionshare/issues/866 | [Jan 07 2019 20:58:37] Onion.cleanup: trying to remove onion 5yym6w3kg4tof56umfy6a632nvtoc5dkkpkhj4zd2slqzp5wuiwml7yd
=> 2.4 MiB video 1.mov[Jan 07 2019 20:58:37] ReceiveMode.update_primary_action
Traceback (most recent call last):
File "onionshare_gui/onionshare_gui.py", line 382, in timer_callback
mode.handle... | KeyError |
def __init__(self, environ, populate_request=True, shallow=False):
super(ReceiveModeRequest, self).__init__(environ, populate_request, shallow)
self.web = environ["web"]
self.stop_q = environ["stop_q"]
self.web.common.log("ReceiveModeRequest", "__init__")
# Prevent running the close() method more ... | def __init__(self, environ, populate_request=True, shallow=False):
super(ReceiveModeRequest, self).__init__(environ, populate_request, shallow)
self.web = environ["web"]
# Is this a valid upload request?
self.upload_request = False
if self.method == "POST":
if self.path == "/{}/upload".form... | https://github.com/micahflee/onionshare/issues/866 | [Jan 07 2019 20:58:37] Onion.cleanup: trying to remove onion 5yym6w3kg4tof56umfy6a632nvtoc5dkkpkhj4zd2slqzp5wuiwml7yd
=> 2.4 MiB video 1.mov[Jan 07 2019 20:58:37] ReceiveMode.update_primary_action
Traceback (most recent call last):
File "onionshare_gui/onionshare_gui.py", line 382, in timer_callback
mode.handle... | KeyError |
def _get_file_stream(
self, total_content_length, content_type, filename=None, content_length=None
):
"""
This gets called for each file that gets uploaded, and returns an file-like
writable stream.
"""
if self.upload_request:
if not self.told_gui_about_request:
# Tell the GU... | def _get_file_stream(
self, total_content_length, content_type, filename=None, content_length=None
):
"""
This gets called for each file that gets uploaded, and returns an file-like
writable stream.
"""
if self.upload_request:
if not self.told_gui_about_request:
# Tell the GU... | https://github.com/micahflee/onionshare/issues/866 | [Jan 07 2019 20:58:37] Onion.cleanup: trying to remove onion 5yym6w3kg4tof56umfy6a632nvtoc5dkkpkhj4zd2slqzp5wuiwml7yd
=> 2.4 MiB video 1.mov[Jan 07 2019 20:58:37] ReceiveMode.update_primary_action
Traceback (most recent call last):
File "onionshare_gui/onionshare_gui.py", line 382, in timer_callback
mode.handle... | KeyError |
def close(self):
"""
Closing the request.
"""
super(ReceiveModeRequest, self).close()
# Prevent calling this method more than once per request
if self.closed:
return
self.closed = True
self.web.common.log("ReceiveModeRequest", "close")
try:
if self.told_gui_about_r... | def close(self):
"""
Closing the request.
"""
super(ReceiveModeRequest, self).close()
try:
if self.told_gui_about_request:
upload_id = self.upload_id
# Inform the GUI that the upload has finished
self.web.add_request(
self.web.REQUEST_UPLOA... | https://github.com/micahflee/onionshare/issues/866 | [Jan 07 2019 20:58:37] Onion.cleanup: trying to remove onion 5yym6w3kg4tof56umfy6a632nvtoc5dkkpkhj4zd2slqzp5wuiwml7yd
=> 2.4 MiB video 1.mov[Jan 07 2019 20:58:37] ReceiveMode.update_primary_action
Traceback (most recent call last):
File "onionshare_gui/onionshare_gui.py", line 382, in timer_callback
mode.handle... | KeyError |
def file_write_func(self, filename, length):
"""
This function gets called when a specific file is written to.
"""
if self.closed:
return
if self.upload_request:
self.progress[filename]["uploaded_bytes"] += length
if self.previous_file != filename:
if self.previ... | def file_write_func(self, filename, length):
"""
This function gets called when a specific file is written to.
"""
if self.upload_request:
self.progress[filename]["uploaded_bytes"] += length
if self.previous_file != filename:
if self.previous_file is not None:
... | https://github.com/micahflee/onionshare/issues/866 | [Jan 07 2019 20:58:37] Onion.cleanup: trying to remove onion 5yym6w3kg4tof56umfy6a632nvtoc5dkkpkhj4zd2slqzp5wuiwml7yd
=> 2.4 MiB video 1.mov[Jan 07 2019 20:58:37] ReceiveMode.update_primary_action
Traceback (most recent call last):
File "onionshare_gui/onionshare_gui.py", line 382, in timer_callback
mode.handle... | KeyError |
def __init__(self, common, web):
self.common = common
self.common.log("ShareModeWeb", "__init__")
self.web = web
# Information about the file to be shared
self.file_info = []
self.is_zipped = False
self.download_filename = None
self.download_filesize = None
self.gzip_filename = Non... | def __init__(self, common, web):
self.common = common
self.common.log("ShareModeWeb", "__init__")
self.web = web
# Information about the file to be shared
self.file_info = []
self.is_zipped = False
self.download_filename = None
self.download_filesize = None
self.gzip_filename = Non... | https://github.com/micahflee/onionshare/issues/866 | [Jan 07 2019 20:58:37] Onion.cleanup: trying to remove onion 5yym6w3kg4tof56umfy6a632nvtoc5dkkpkhj4zd2slqzp5wuiwml7yd
=> 2.4 MiB video 1.mov[Jan 07 2019 20:58:37] ReceiveMode.update_primary_action
Traceback (most recent call last):
File "onionshare_gui/onionshare_gui.py", line 382, in timer_callback
mode.handle... | KeyError |
def define_routes(self):
"""
The web app routes for sharing files
"""
@self.web.app.route("/<slug_candidate>")
def index(slug_candidate):
self.web.check_slug_candidate(slug_candidate)
return index_logic()
@self.web.app.route("/")
def index_public():
if not self.comm... | def define_routes(self):
"""
The web app routes for sharing files
"""
@self.web.app.route("/<slug_candidate>")
def index(slug_candidate):
self.web.check_slug_candidate(slug_candidate)
return index_logic()
@self.web.app.route("/")
def index_public():
if not self.comm... | https://github.com/micahflee/onionshare/issues/866 | [Jan 07 2019 20:58:37] Onion.cleanup: trying to remove onion 5yym6w3kg4tof56umfy6a632nvtoc5dkkpkhj4zd2slqzp5wuiwml7yd
=> 2.4 MiB video 1.mov[Jan 07 2019 20:58:37] ReceiveMode.update_primary_action
Traceback (most recent call last):
File "onionshare_gui/onionshare_gui.py", line 382, in timer_callback
mode.handle... | KeyError |
def download_logic(slug_candidate=""):
"""
Download the zip file.
"""
# Deny new downloads if "Stop After First Download" is checked and there is
# currently a download
deny_download = not self.web.stay_open and self.download_in_progress
if deny_download:
r = make_response(render_tem... | def download_logic(slug_candidate=""):
"""
Download the zip file.
"""
# Deny new downloads if "Stop After First Download" is checked and there is
# currently a download
deny_download = not self.web.stay_open and self.download_in_progress
if deny_download:
r = make_response(render_tem... | https://github.com/micahflee/onionshare/issues/866 | [Jan 07 2019 20:58:37] Onion.cleanup: trying to remove onion 5yym6w3kg4tof56umfy6a632nvtoc5dkkpkhj4zd2slqzp5wuiwml7yd
=> 2.4 MiB video 1.mov[Jan 07 2019 20:58:37] ReceiveMode.update_primary_action
Traceback (most recent call last):
File "onionshare_gui/onionshare_gui.py", line 382, in timer_callback
mode.handle... | KeyError |
def generate():
# Starting a new download
if not self.web.stay_open:
self.download_in_progress = True
chunk_size = 102400 # 100kb
fp = open(file_to_download, "rb")
self.web.done = False
canceled = False
while not self.web.done:
# The user has canceled the download, so stop... | def generate():
# The user hasn't canceled the download
self.client_cancel = False
# Starting a new download
if not self.web.stay_open:
self.download_in_progress = True
chunk_size = 102400 # 100kb
fp = open(file_to_download, "rb")
self.web.done = False
canceled = False
wh... | https://github.com/micahflee/onionshare/issues/866 | [Jan 07 2019 20:58:37] Onion.cleanup: trying to remove onion 5yym6w3kg4tof56umfy6a632nvtoc5dkkpkhj4zd2slqzp5wuiwml7yd
=> 2.4 MiB video 1.mov[Jan 07 2019 20:58:37] ReceiveMode.update_primary_action
Traceback (most recent call last):
File "onionshare_gui/onionshare_gui.py", line 382, in timer_callback
mode.handle... | KeyError |
def __init__(self, common, is_gui, mode="share"):
self.common = common
self.common.log("Web", "__init__", "is_gui={}, mode={}".format(is_gui, mode))
# The flask app
self.app = Flask(
__name__,
static_folder=self.common.get_resource_path("static"),
template_folder=self.common.get... | def __init__(self, common, is_gui, mode="share"):
self.common = common
self.common.log("Web", "__init__", "is_gui={}, mode={}".format(is_gui, mode))
# The flask app
self.app = Flask(
__name__,
static_folder=self.common.get_resource_path("static"),
template_folder=self.common.get... | https://github.com/micahflee/onionshare/issues/866 | [Jan 07 2019 20:58:37] Onion.cleanup: trying to remove onion 5yym6w3kg4tof56umfy6a632nvtoc5dkkpkhj4zd2slqzp5wuiwml7yd
=> 2.4 MiB video 1.mov[Jan 07 2019 20:58:37] ReceiveMode.update_primary_action
Traceback (most recent call last):
File "onionshare_gui/onionshare_gui.py", line 382, in timer_callback
mode.handle... | KeyError |
def start(self, port, stay_open=False, public_mode=False, persistent_slug=None):
"""
Start the flask web server.
"""
self.common.log(
"Web",
"start",
"port={}, stay_open={}, public_mode={}, persistent_slug={}".format(
port, stay_open, public_mode, persistent_slug
... | def start(self, port, stay_open=False, public_mode=False, persistent_slug=None):
"""
Start the flask web server.
"""
self.common.log(
"Web",
"start",
"port={}, stay_open={}, public_mode={}, persistent_slug={}".format(
port, stay_open, public_mode, persistent_slug
... | https://github.com/micahflee/onionshare/issues/866 | [Jan 07 2019 20:58:37] Onion.cleanup: trying to remove onion 5yym6w3kg4tof56umfy6a632nvtoc5dkkpkhj4zd2slqzp5wuiwml7yd
=> 2.4 MiB video 1.mov[Jan 07 2019 20:58:37] ReceiveMode.update_primary_action
Traceback (most recent call last):
File "onionshare_gui/onionshare_gui.py", line 382, in timer_callback
mode.handle... | KeyError |
def stop(self, port):
"""
Stop the flask web server by loading /shutdown.
"""
self.common.log("Web", "stop", "stopping server")
# Let the mode know that the user stopped the server
self.stop_q.put(True)
# To stop flask, load http://127.0.0.1:<port>/<shutdown_slug>/shutdown
if self.runn... | def stop(self, port):
"""
Stop the flask web server by loading /shutdown.
"""
if self.mode == "share":
# If the user cancels the download, let the download function know to stop
# serving the file
self.share_mode.client_cancel = True
# To stop flask, load http://127.0.0.1:<... | https://github.com/micahflee/onionshare/issues/866 | [Jan 07 2019 20:58:37] Onion.cleanup: trying to remove onion 5yym6w3kg4tof56umfy6a632nvtoc5dkkpkhj4zd2slqzp5wuiwml7yd
=> 2.4 MiB video 1.mov[Jan 07 2019 20:58:37] ReceiveMode.update_primary_action
Traceback (most recent call last):
File "onionshare_gui/onionshare_gui.py", line 382, in timer_callback
mode.handle... | KeyError |
def get_finished_label_text(self, started):
"""
When an item finishes, returns a string displaying the start/end datetime range.
started is a datetime object.
"""
return self._get_label_text(
"gui_all_modes_transfer_finished",
"gui_all_modes_transfer_finished_range",
started,... | def get_finished_label_text(self, started):
"""
When an item finishes, returns a string displaying the start/end datetime range.
started is a datetime object.
"""
ended = datetime.now()
if (
started.year == ended.year
and started.month == ended.month
and started.day == en... | https://github.com/micahflee/onionshare/issues/866 | [Jan 07 2019 20:58:37] Onion.cleanup: trying to remove onion 5yym6w3kg4tof56umfy6a632nvtoc5dkkpkhj4zd2slqzp5wuiwml7yd
=> 2.4 MiB video 1.mov[Jan 07 2019 20:58:37] ReceiveMode.update_primary_action
Traceback (most recent call last):
File "onionshare_gui/onionshare_gui.py", line 382, in timer_callback
mode.handle... | KeyError |
def update(self, data):
"""
Using the progress from Web, update the progress bar and file size labels
for each file
"""
if data["action"] == "progress":
total_uploaded_bytes = 0
for filename in data["progress"]:
total_uploaded_bytes += data["progress"][filename]["uploaded... | def update(self, data):
"""
Using the progress from Web, update the progress bar and file size labels
for each file
"""
if data["action"] == "progress":
total_uploaded_bytes = 0
for filename in data["progress"]:
total_uploaded_bytes += data["progress"][filename]["uploaded... | https://github.com/micahflee/onionshare/issues/866 | [Jan 07 2019 20:58:37] Onion.cleanup: trying to remove onion 5yym6w3kg4tof56umfy6a632nvtoc5dkkpkhj4zd2slqzp5wuiwml7yd
=> 2.4 MiB video 1.mov[Jan 07 2019 20:58:37] ReceiveMode.update_primary_action
Traceback (most recent call last):
File "onionshare_gui/onionshare_gui.py", line 382, in timer_callback
mode.handle... | KeyError |
def init(self):
"""
Custom initialization for ReceiveMode.
"""
# Create the Web object
self.web = Web(self.common, True, "receive")
# Server status
self.server_status.set_mode("receive")
self.server_status.server_started_finished.connect(self.update_primary_action)
self.server_statu... | def init(self):
"""
Custom initialization for ReceiveMode.
"""
# Create the Web object
self.web = Web(self.common, True, "receive")
# Server status
self.server_status.set_mode("receive")
self.server_status.server_started_finished.connect(self.update_primary_action)
self.server_statu... | https://github.com/micahflee/onionshare/issues/866 | [Jan 07 2019 20:58:37] Onion.cleanup: trying to remove onion 5yym6w3kg4tof56umfy6a632nvtoc5dkkpkhj4zd2slqzp5wuiwml7yd
=> 2.4 MiB video 1.mov[Jan 07 2019 20:58:37] ReceiveMode.update_primary_action
Traceback (most recent call last):
File "onionshare_gui/onionshare_gui.py", line 382, in timer_callback
mode.handle... | KeyError |
def init(self):
"""
Custom initialization for ReceiveMode.
"""
# Threads start out as None
self.compress_thread = None
# Create the Web object
self.web = Web(self.common, True, "share")
# File selection
self.file_selection = FileSelection(self.common, self)
if self.filenames:
... | def init(self):
"""
Custom initialization for ReceiveMode.
"""
# Threads start out as None
self.compress_thread = None
# Create the Web object
self.web = Web(self.common, True, "share")
# File selection
self.file_selection = FileSelection(self.common, self)
if self.filenames:
... | https://github.com/micahflee/onionshare/issues/866 | [Jan 07 2019 20:58:37] Onion.cleanup: trying to remove onion 5yym6w3kg4tof56umfy6a632nvtoc5dkkpkhj4zd2slqzp5wuiwml7yd
=> 2.4 MiB video 1.mov[Jan 07 2019 20:58:37] ReceiveMode.update_primary_action
Traceback (most recent call last):
File "onionshare_gui/onionshare_gui.py", line 382, in timer_callback
mode.handle... | KeyError |
def timer_callback(self):
"""
Check for messages communicated from the web app, and update the GUI accordingly. Also,
call ShareMode and ReceiveMode's timer_callbacks.
"""
self.update()
if not self.local_only:
# Have we lost connection to Tor somehow?
if not self.onion.is_authen... | def timer_callback(self):
"""
Check for messages communicated from the web app, and update the GUI accordingly. Also,
call ShareMode and ReceiveMode's timer_callbacks.
"""
self.update()
if not self.local_only:
# Have we lost connection to Tor somehow?
if not self.onion.is_authen... | https://github.com/micahflee/onionshare/issues/866 | [Jan 07 2019 20:58:37] Onion.cleanup: trying to remove onion 5yym6w3kg4tof56umfy6a632nvtoc5dkkpkhj4zd2slqzp5wuiwml7yd
=> 2.4 MiB video 1.mov[Jan 07 2019 20:58:37] ReceiveMode.update_primary_action
Traceback (most recent call last):
File "onionshare_gui/onionshare_gui.py", line 382, in timer_callback
mode.handle... | KeyError |
def build_data_dir(self):
"""
Returns the path of the OnionShare data directory.
"""
if self.platform == "Windows":
try:
appdata = os.environ["APPDATA"]
onionshare_data_dir = "{}\\OnionShare".format(appdata)
except:
# If for some reason we don't have t... | def build_data_dir(self):
"""
Returns the path of the OnionShare data directory.
"""
if self.platform == "Windows":
try:
appdata = os.environ["APPDATA"]
return "{}\\OnionShare".format(appdata)
except:
# If for some reason we don't have the 'APPDATA' en... | https://github.com/micahflee/onionshare/issues/850 | OnionShare 2.0.dev1 | https://onionshare.org/
[Dec 19 2018 03:36:17 PM] Onion.__init__
[Dec 19 2018 03:36:17 PM] OnionShare.__init__
[Dec 19 2018 03:36:17 PM] OnionShareGui.__init__
[Dec 19 2018 03:36:18 PM] Web.__init__: is_gui=True, mode=share
Traceback (most recent call last):
File "./dev_scripts/onionshare-gui", li... | FileNotFoundError |
def cancel(self):
self.mode.common.log("CompressThread", "cancel")
# Let the Web and ZipWriter objects know that we're canceling compression early
self.mode.web.cancel_compression = True
try:
self.mode.web.zip_writer.cancel_compression = True
except AttributeError:
# we never made i... | def cancel(self):
self.mode.common.log("CompressThread", "cancel")
# Let the Web and ZipWriter objects know that we're canceling compression early
self.mode.web.cancel_compression = True
if self.mode.web.zip_writer:
self.mode.web.zip_writer.cancel_compression = True
| https://github.com/micahflee/onionshare/issues/790 | [Sep 24 2018 23:15:34] Web.check_shutdown_slug_candidate: slug_candidate=ymf5eposfwver2gpegmic5drki
127.0.0.1 - - [24/Sep/2018 23:15:34] "GET /ymf5eposfwver2gpegmic5drki/shutdown HTTP/1.1" 200 -
[Sep 24 2018 23:15:34] OnionShare.cleanup
[Sep 24 2018 23:15:34] Onion.cleanup
[Sep 24 2018 23:15:34] Onion.cleanup: trying t... | AttributeError |
def __init__(self, environ, populate_request=True, shallow=False):
super(ReceiveModeRequest, self).__init__(environ, populate_request, shallow)
self.web = environ["web"]
# Is this a valid upload request?
self.upload_request = False
if self.method == "POST":
if self.path == "/{}/upload".form... | def __init__(self, environ, populate_request=True, shallow=False):
super(ReceiveModeRequest, self).__init__(environ, populate_request, shallow)
self.web = environ["web"]
# Is this a valid upload request?
self.upload_request = False
if self.method == "POST":
if self.path == "/{}/upload".form... | https://github.com/micahflee/onionshare/issues/781 | [Sep 22 2018 10:19:11 AM] Web.check_slug_candidate: slug_candidate=leggings-cornea
127.0.0.1 - - [22/Sep/2018 10:19:11] "GET /leggings-cornea HTTP/1.1" 200 -
127.0.0.1 - - [22/Sep/2018 10:19:15] "GET /static/css/style.css HTTP/1.1" 200 -
127.0.0.1 - - [22/Sep/2018 10:19:16] "GET /static/img/logo.png HTTP/1.1" 200 -
127... | AttributeError |
def run(self):
self.mode.common.log("OnionThread", "run")
self.mode.app.stay_open = not self.mode.common.settings.get(
"close_after_first_download"
)
# start onionshare http service in new thread
self.mode.web_thread = WebThread(self.mode)
self.mode.web_thread.start()
# wait for m... | def run(self):
self.mode.common.log("OnionThread", "run")
try:
self.mode.app.start_onion_service()
self.success.emit()
except (
TorTooOld,
TorErrorInvalidSetting,
TorErrorAutomatic,
TorErrorSocketPort,
TorErrorSocketFile,
TorErrorMissingPassw... | https://github.com/micahflee/onionshare/issues/764 | user@onionshare:~/git/onionshare$ ./dev_scripts/onionshare-gui --debug
OnionShare 2.0.dev | https://onionshare.org/
[Sep 19 2018 02:14:55 PM] Onion.__init__
[Sep 19 2018 02:14:55 PM] OnionShare.__init__
[Sep 19 2018 02:14:55 PM] OnionShareGui.__init__
[Sep 19 2018 02:14:55 PM] Settings.__init__
[Sep 19 2018 02:14:55 PM... | TypeError |
def main(cwd=None):
"""
The main() function implements all of the logic that the command-line version of
onionshare uses.
"""
common = Common()
strings.load_strings(common)
print(strings._("version_string").format(common.version))
# OnionShare CLI in OSX needs to change current working... | def main(cwd=None):
"""
The main() function implements all of the logic that the command-line version of
onionshare uses.
"""
common = Common()
strings.load_strings(common)
print(strings._("version_string").format(common.version))
# OnionShare CLI in OSX needs to change current working... | https://github.com/micahflee/onionshare/issues/760 | $ ./dev_scripts/onionshare --receive
OnionShare 1.3.1 | https://onionshare.org/
Connecting to the Tor network: 100% - Done
Configuring onion service on port 17641.
Starting ephemeral Tor onion service and awaiting publication
Traceback (most recent call last):
File "/home/user/code/onionshare/onionshare/onion.py", line... | stem.ProtocolError |
def start_onion_service(self, port):
"""
Start a onion service on port 80, pointing to the given port, and
return the onion hostname.
"""
self.common.log("Onion", "start_onion_service")
self.auth_string = None
if not self.supports_ephemeral:
raise TorTooOld(strings._("error_ephemera... | def start_onion_service(self, port):
"""
Start a onion service on port 80, pointing to the given port, and
return the onion hostname.
"""
self.common.log("Onion", "start_onion_service")
self.auth_string = None
if not self.supports_ephemeral:
raise TorTooOld(strings._("error_ephemera... | https://github.com/micahflee/onionshare/issues/760 | $ ./dev_scripts/onionshare --receive
OnionShare 1.3.1 | https://onionshare.org/
Connecting to the Tor network: 100% - Done
Configuring onion service on port 17641.
Starting ephemeral Tor onion service and awaiting publication
Traceback (most recent call last):
File "/home/user/code/onionshare/onionshare/onion.py", line... | stem.ProtocolError |
def _initSystemTray(self):
menu = QtWidgets.QMenu()
self.settingsAction = menu.addAction(strings._("gui_settings_window_title", True))
self.settingsAction.triggered.connect(self.open_settings)
self.helpAction = menu.addAction(strings._("gui_settings_button_help", True))
self.helpAction.triggered.con... | def _initSystemTray(self):
menu = QtWidgets.QMenu()
self.settingsAction = menu.addAction(strings._("gui_settings_window_title", True))
self.settingsAction.triggered.connect(self.open_settings)
self.helpAction = menu.addAction(strings._("gui_settings_button_help", True))
self.helpAction.triggered.con... | https://github.com/micahflee/onionshare/issues/702 | OnionShare.app/Contents/MacOS/onionshare-gui
OnionShare 1.3 | https://onionshare.org/
Traceback (most recent call last):
File "onionshare_gui/settings_dialog.py", line 795, in help_clicked
self.common.log('SettingsDialog', 'help_clicked')
AttributeError: 'bool' object has no attribute 'common'
Abort trap: 6 | AttributeError |
def get_resource_path(filename):
"""
Returns the absolute path of a resource, regardless of whether OnionShare is installed
systemwide, and whether regardless of platform
"""
p = get_platform()
if getattr(sys, "onionshare_dev_mode", False):
# Look for resources directory relative to pyt... | def get_resource_path(filename):
"""
Returns the absolute path of a resource, regardless of whether OnionShare is installed
systemwide, and whether regardless of platform
"""
p = get_platform()
if p == "Linux" and sys.argv and sys.argv[0].startswith(sys.prefix):
# OnionShare is installed... | https://github.com/micahflee/onionshare/issues/311 | Traceback (most recent call last):
File "./install/scripts/onionshare", line 21, in <module>
import onionshare
ImportError: No module named 'onionshare' | ImportError |
def __init__(self, basename, webapp_port):
global window_icon
QWebView.__init__(self)
self.setWindowTitle("{0} | OnionShare".format(basename.decode("utf-8")))
self.resize(580, 400)
self.setMinimumSize(580, 400)
self.setMaximumSize(580, 400)
self.setWindowIcon(window_icon)
self.load(QUrl(... | def __init__(self, basename, webapp_port):
global window_icon
QWebView.__init__(self)
self.setWindowTitle("{0} | OnionShare".format(basename))
self.resize(580, 400)
self.setMinimumSize(580, 400)
self.setMaximumSize(580, 400)
self.setWindowIcon(window_icon)
self.load(QUrl("http://127.0.0.... | https://github.com/micahflee/onionshare/issues/80 | Traceback (most recent call last):
File "<string>", line 7, in <module>
File "/Users/micah/code/onionshare/build/onionshare-osx/out00-PYZ.pyz/onionshare_gui.onionshare_gui", line 121, in main
File "/Users/micah/code/onionshare/build/onionshare-osx/out00-PYZ.pyz/onionshare_gui.onionshare_gui", line 68, in select_file
Un... | UnicodeEncodeError |
def select_file(strings, filename=None):
# get filename, either from argument or file chooser dialog
if not filename:
args = {}
if onionshare.get_platform() == "Tails":
args["directory"] = "/home/amnesia"
filename = QFileDialog.getOpenFileName(
caption=translated... | def select_file(strings, filename=None):
# get filename, either from argument or file chooser dialog
if not filename:
args = {}
if onionshare.get_platform() == "Tails":
args["directory"] = "/home/amnesia"
filename = QFileDialog.getOpenFileName(
caption=translated... | https://github.com/micahflee/onionshare/issues/80 | Traceback (most recent call last):
File "<string>", line 7, in <module>
File "/Users/micah/code/onionshare/build/onionshare-osx/out00-PYZ.pyz/onionshare_gui.onionshare_gui", line 121, in main
File "/Users/micah/code/onionshare/build/onionshare-osx/out00-PYZ.pyz/onionshare_gui.onionshare_gui", line 68, in select_file
Un... | UnicodeEncodeError |
def _add_install(subparsers):
p = subparsers.add_parser(
"install",
help="Install a package",
formatter_class=LineWrapRawTextHelpFormatter,
description=INSTALL_DESCRIPTION,
)
p.add_argument("package", help="package name")
p.add_argument("--spec", help=SPEC_HELP)
add_i... | def _add_install(subparsers):
p = subparsers.add_parser(
"install",
help="Install a package",
formatter_class=LineWrapRawTextHelpFormatter,
description=INSTALL_DESCRIPTION,
)
p.add_argument("package", help="package name")
p.add_argument("--spec", help=SPEC_HELP)
add_i... | https://github.com/pipxproject/pipx/issues/231 | $ python3.7 -m pip install --user pipx
$ python3.7 -m pipx run --python python3.4 cowsay 'Hello, world!'
_____________
< Hello, world! >
=============
\
\
^__^
(oo)\_______
(__)\ )\/\
||----w |
|| ||
$ python3.7 -m pipx install --python python3.4 cowsay
File "<string>", line 89
app_paths_of_dependencies: ... | SyntaxError |
def _add_run(subparsers):
p = subparsers.add_parser(
"run",
formatter_class=LineWrapRawTextHelpFormatter,
help=(
"Download the latest version of a package to a temporary virtual environment, "
"then run an app from it. Also compatible with local `__pypackages__` "
... | def _add_run(subparsers):
p = subparsers.add_parser(
"run",
formatter_class=LineWrapRawTextHelpFormatter,
help=(
"Download the latest version of a package to a temporary virtual environment, "
"then run an app from it. Also compatible with local `__pypackages__` "
... | https://github.com/pipxproject/pipx/issues/231 | $ python3.7 -m pip install --user pipx
$ python3.7 -m pipx run --python python3.4 cowsay 'Hello, world!'
_____________
< Hello, world! >
=============
\
\
^__^
(oo)\_______
(__)\ )\/\
||----w |
|| ||
$ python3.7 -m pipx install --python python3.4 cowsay
File "<string>", line 89
app_paths_of_dependencies: ... | SyntaxError |
def main():
package = sys.argv[1]
bin_path = Path(sys.argv[2])
apps = get_apps(package, bin_path)
app_paths = [str(Path(bin_path) / app) for app in apps]
app_paths_of_dependencies = {} # type: Dict[str, List[str]]
app_paths_of_dependencies = _dfs_package_apps(
bin_path, package, app_pa... | def main():
package = sys.argv[1]
bin_path = Path(sys.argv[2])
apps = get_apps(package, bin_path)
app_paths = [str(Path(bin_path) / app) for app in apps]
app_paths_of_dependencies: Dict[str, List[str]] = {}
app_paths_of_dependencies = _dfs_package_apps(
bin_path, package, app_paths_of_d... | https://github.com/pipxproject/pipx/issues/231 | $ python3.7 -m pip install --user pipx
$ python3.7 -m pipx run --python python3.4 cowsay 'Hello, world!'
_____________
< Hello, world! >
=============
\
\
^__^
(oo)\_______
(__)\ )\/\
||----w |
|| ||
$ python3.7 -m pipx install --python python3.4 cowsay
File "<string>", line 89
app_paths_of_dependencies: ... | SyntaxError |
def guard(clusters):
"""
Split Clusters containing conditional expressions into separate Clusters.
"""
processed = []
for c in clusters:
# Group together consecutive expressions with same ConditionalDimensions
for cds, g in groupby(c.exprs, key=lambda e: tuple(e.conditionals)):
... | def guard(clusters):
"""
Split Clusters containing conditional expressions into separate Clusters.
"""
processed = []
for c in clusters:
# Group together consecutive expressions with same ConditionalDimensions
for cds, g in groupby(c.exprs, key=lambda e: e.conditionals):
... | https://github.com/devitocodes/devito/issues/1298 | Traceback (most recent call last):
File "tests/mfe_args.py", line 23, in <module>
op.apply()
File "/home/gbisbas/workspace/devito/devito/operator/operator.py", line 655, in apply
args = self.arguments(**kwargs)
File "/home/gbisbas/workspace/devito/devito/operator/operator.py", line 537, in arguments
args = self._prepar... | AttributeError |
def __new__(cls, *args, **kwargs):
if len(args) == 1 and isinstance(args[0], LoweredEq):
# origin: LoweredEq(devito.LoweredEq, **kwargs)
input_expr = args[0]
expr = sympy.Eq.__new__(cls, *input_expr.args, evaluate=False)
for i in cls._state:
setattr(expr, "_%s" % i, kwarg... | def __new__(cls, *args, **kwargs):
if len(args) == 1 and isinstance(args[0], LoweredEq):
# origin: LoweredEq(devito.LoweredEq, **kwargs)
input_expr = args[0]
expr = sympy.Eq.__new__(cls, *input_expr.args, evaluate=False)
for i in cls._state:
setattr(expr, "_%s" % i, kwarg... | https://github.com/devitocodes/devito/issues/1298 | Traceback (most recent call last):
File "tests/mfe_args.py", line 23, in <module>
op.apply()
File "/home/gbisbas/workspace/devito/devito/operator/operator.py", line 655, in apply
args = self.arguments(**kwargs)
File "/home/gbisbas/workspace/devito/devito/operator/operator.py", line 537, in arguments
args = self._prepar... | AttributeError |
def __init__(self, exprs, rules=None):
"""
A Scope enables data dependence analysis on a totally ordered sequence
of expressions.
"""
exprs = as_tuple(exprs)
self.reads = {}
self.writes = {}
self.initialized = set()
for i, e in enumerate(exprs):
# Reads
for j in re... | def __init__(self, exprs, rules=None):
"""
A Scope enables data dependence analysis on a totally ordered sequence
of expressions.
"""
exprs = as_tuple(exprs)
self.reads = {}
self.writes = {}
self.initialized = set()
for i, e in enumerate(exprs):
# Reads
for j in re... | https://github.com/devitocodes/devito/issues/1298 | Traceback (most recent call last):
File "tests/mfe_args.py", line 23, in <module>
op.apply()
File "/home/gbisbas/workspace/devito/devito/operator/operator.py", line 655, in apply
args = self.arguments(**kwargs)
File "/home/gbisbas/workspace/devito/devito/operator/operator.py", line 537, in arguments
args = self._prepar... | AttributeError |
def detect_io(exprs, relax=False):
"""
``{exprs} -> ({reads}, {writes})``
Parameters
----------
exprs : expr-like or list of expr-like
The searched expressions.
relax : bool, optional
If False, as by default, collect only Constants and Functions.
Otherwise, collect any B... | def detect_io(exprs, relax=False):
"""
``{exprs} -> ({reads}, {writes})``
Parameters
----------
exprs : expr-like or list of expr-like
The searched expressions.
relax : bool, optional
If False, as by default, collect only Constants and Functions.
Otherwise, collect any B... | https://github.com/devitocodes/devito/issues/1298 | Traceback (most recent call last):
File "tests/mfe_args.py", line 23, in <module>
op.apply()
File "/home/gbisbas/workspace/devito/devito/operator/operator.py", line 655, in apply
args = self.arguments(**kwargs)
File "/home/gbisbas/workspace/devito/devito/operator/operator.py", line 537, in arguments
args = self._prepar... | AttributeError |
def option_performance(f):
"""Defines options for all aspects of performance tuning"""
_preset = {
# Fixed
"O1": {"dse": "basic", "dle": "advanced"},
"O2": {"dse": "advanced", "dle": "advanced"},
"O3": {"dse": "aggressive", "dle": "advanced"},
# Parametric
"dse":... | def option_performance(f):
"""Defines options for all aspects of performance tuning"""
_preset = {
# Fixed
"O1": {"dse": "basic", "dle": "advanced"},
"O2": {"dse": "advanced", "dle": "advanced"},
"O3": {"dse": "aggressive", "dle": "advanced"},
# Parametric
"dse":... | https://github.com/devitocodes/devito/issues/1128 | python benchmarks/user/benchmark.py run --help
Traceback (most recent call last):
File "benchmarks/user/benchmark.py", line 507, in <module>
benchmark()
File "/home/gb4018/anaconda3/envs/devito/lib/python3.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/gb4018/anacond... | TypeError |
def _signature_items(self):
items = sorted(
it for it in self.items() if it[0] not in ["log_level", "first_touch"]
)
return tuple(str(items)) + tuple(str(sorted(self.backend.items())))
| def _signature_items(self):
return tuple(str(sorted(self.items()))) + tuple(str(sorted(self.backend.items())))
| https://github.com/devitocodes/devito/issues/625 | devito @ mathias-2 [mathiaslouboutin]: python3 examples/seismic/acoustic/acoustic_example.py -nd 1
Applying Forward
GNUCompiler: compiled `/var/folders/mx/qs0dn9rx7zn6dz2zvwv7tkk00000gn/T/devito-jitcache-uid501/6d6742923d061de6b8ae547876c2117421e010a5.c` [1.21 s]
========================================================... | OSError |
def main(argv=sys.argv):
options = None
logger = None
try:
from . import rlutil
parser = _get_optparse()
(options, args) = parser.parse_args(argv[1:])
args = rlutil.resolve_launch_arguments(args)
_validate_args(parser, options, args)
# node args doesn't req... | def main(argv=sys.argv):
options = None
logger = None
try:
from . import rlutil
parser = _get_optparse()
(options, args) = parser.parse_args(argv[1:])
args = rlutil.resolve_launch_arguments(args)
_validate_args(parser, options, args)
# node args doesn't req... | https://github.com/ros/ros_comm/issues/1971 | Traceback (most recent call last):
File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/__init__.py", line 275, in main
import arg_dump as roslaunch_arg_dump
ModuleNotFoundError: No module named 'arg_dump' | ModuleNotFoundError |
def _validate_args(parser, options, args):
# validate args first so we don't spin up any resources
if options.child_name:
if not options.server_uri:
parser.error("--child option requires --server_uri to be set as well")
if not options.run_id:
parser.error("--child option ... | def _validate_args(parser, options, args):
# validate args first so we don't spin up any resources
if options.child_name:
if not options.server_uri:
parser.error("--child option requires --server_uri to be set as well")
if not options.run_id:
parser.error("--child option ... | https://github.com/ros/ros_comm/issues/1964 | $ xxx@pandart01:~$ roslaunch franka_example_controllers move_to_start.launch test
Traceback (most recent call last):
File "/opt/ros/melodic/lib/python3.8/site-packages/roslaunch/__init__.py", line 246, in main
_validate_args(parser, options, args)
File "/opt/ros/melodic/lib/python3.8/site-packages/roslaunch/__init__.py... | NameError |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.