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 parse_code_line(self, status, code):
firstchar = status[0]
if firstchar == "-" or (self.excluding and firstchar in "#=0123456789"):
# remember certain non-executed lines
if self.excluding or is_non_code(code):
self.noncode.add(self.lineno)
return True
if firstchar =... | def parse_code_line(self, status, code):
firstchar = status[0]
if firstchar == "-" or (self.excluding and firstchar in "#=0123456789"):
# remember certain non-executed lines
if self.excluding or is_non_code(code):
self.noncode.add(self.lineno)
return True
if firstchar =... | https://github.com/gcovr/gcovr/issues/226 | Traceback (most recent call last):
File "/usr/local/bin/gcovr", line 2412, in <module>
process_datafile(file_, covdata, options)
File "/usr/local/bin/gcovr", line 884, in process_datafile
process_gcov_data(fname, covdata, abs_filename, options)
File "/usr/local/bin/gcovr", line 616, in process_gcov_data
covered[lineno]... | ValueError |
def parse_tag_line(self, line, exclude_unreachable_branches):
# Start or end a template/macro specialization section
if line.startswith("-----"):
self.last_was_specialization_section_marker = True
return True
last_was_marker = self.last_was_specialization_section_marker
self.last_was_sp... | def parse_tag_line(self, line, exclude_unreachable_branches):
if line.startswith("function "):
return True
if line.startswith("call "):
return True
if line.startswith("branch "):
exclude_branch = False
if exclude_unreachable_branches and self.lineno == self.last_code_lineno... | https://github.com/gcovr/gcovr/issues/226 | Traceback (most recent call last):
File "/usr/local/bin/gcovr", line 2412, in <module>
process_datafile(file_, covdata, options)
File "/usr/local/bin/gcovr", line 884, in process_datafile
process_gcov_data(fname, covdata, abs_filename, options)
File "/usr/local/bin/gcovr", line 616, in process_gcov_data
covered[lineno]... | ValueError |
def osm_bldg_download(
polygon=None,
north=None,
south=None,
east=None,
west=None,
timeout=180,
memory=None,
max_query_area_size=50 * 1000 * 50 * 1000,
):
"""
Download OpenStreetMap building footprint data.
Parameters
----------
polygon : shapely Polygon or MultiPoly... | def osm_bldg_download(
polygon=None,
north=None,
south=None,
east=None,
west=None,
timeout=180,
memory=None,
max_query_area_size=50 * 1000 * 50 * 1000,
):
"""
Download OpenStreetMap building footprint data.
Parameters
----------
polygon : shapely Polygon or MultiPoly... | https://github.com/gboeing/osmnx/issues/158 | ExceptionTraceback (most recent call last)
<ipython-input-4-40571a0b7fcd> in <module>()
----> 1 gdf = ox.buildings_from_place(place='Piedmont, California, USA')
2 gdf_proj = ox.project_gdf(gdf)
3 fig, ax = ox.plot_buildings(gdf_proj, bgcolor='#333333', color='w', save=True, show=False, close=True, filename='piedmont_bl... | Exception |
def osm_bldg_download(
polygon=None,
north=None,
south=None,
east=None,
west=None,
timeout=180,
memory=None,
max_query_area_size=50 * 1000 * 50 * 1000,
):
"""
Download OpenStreetMap building footprint data.
Parameters
----------
polygon : shapely Polygon or MultiPoly... | def osm_bldg_download(
polygon=None,
north=None,
south=None,
east=None,
west=None,
timeout=180,
memory=None,
max_query_area_size=50 * 1000 * 50 * 1000,
):
"""
Download OpenStreetMap building footprint data.
Parameters
----------
polygon : shapely Polygon or MultiPoly... | https://github.com/gboeing/osmnx/issues/158 | ExceptionTraceback (most recent call last)
<ipython-input-4-40571a0b7fcd> in <module>()
----> 1 gdf = ox.buildings_from_place(place='Piedmont, California, USA')
2 gdf_proj = ox.project_gdf(gdf)
3 fig, ax = ox.plot_buildings(gdf_proj, bgcolor='#333333', color='w', save=True, show=False, close=True, filename='piedmont_bl... | Exception |
def truncate_graph_polygon(
G,
polygon,
retain_all=False,
truncate_by_edge=False,
quadrat_width=0.05,
min_num=3,
buffer_amount=1e-9,
):
"""
Remove every node in graph that falls outside some shapely Polygon or
MultiPolygon.
Parameters
----------
G : networkx multidig... | def truncate_graph_polygon(
G,
polygon,
retain_all=False,
truncate_by_edge=False,
quadrat_width=0.05,
min_num=3,
buffer_amount=1e-9,
):
"""
Remove every node in graph that falls outside some shapely Polygon or
MultiPolygon.
Parameters
----------
G : networkx multidig... | https://github.com/gboeing/osmnx/issues/9 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-2-0d3afc68e96a> in <module>()
----> 1 ox.plot_graph(ox.graph_from_place('Modena, Italy'))
/usr/local/lib/python3.4/dist-packages/osmnx/osmnx.py in graph... | TypeError |
def add_paths(G, paths, bidirectional=False):
"""
Add a collection of paths to the graph.
Parameters
----------
G : networkx multidigraph
paths : dict
the paths from OSM
bidirectional : bool
if True, create bidirectional edges for one-way streets
Returns
-------
... | def add_paths(G, paths, bidirectional=False):
"""
Add a collection of paths to the graph.
Parameters
----------
G : networkx multidigraph
paths : dict
the paths from OSM
bidirectional : bool
if True, create bidirectional edges for one-way streets
Returns
-------
... | https://github.com/gboeing/osmnx/issues/9 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-2-0d3afc68e96a> in <module>()
----> 1 ox.plot_graph(ox.graph_from_place('Modena, Italy'))
/usr/local/lib/python3.4/dist-packages/osmnx/osmnx.py in graph... | TypeError |
def osm_polygon_download(query, limit=1, polygon_geojson=1):
"""
Geocode a place and download its boundary geometry from OSM's Nominatim API.
Parameters
----------
query : string or dict
query string or structured query dict to geocode/download
limit : int
max number of results ... | def osm_polygon_download(query, limit=1, polygon_geojson=1):
"""
Geocode a place and download its boundary geometry from OSM's Nominatim API.
Parameters
----------
query : string or dict
query string or structured query dict to geocode/download
limit : int
max number of results ... | https://github.com/gboeing/osmnx/issues/9 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-2-0d3afc68e96a> in <module>()
----> 1 ox.plot_graph(ox.graph_from_place('Modena, Italy'))
/usr/local/lib/python3.4/dist-packages/osmnx/osmnx.py in graph... | TypeError |
def redistribute_vertices(geom, dist):
"""
Redistribute the vertices on a projected LineString or MultiLineString. The distance
argument is only approximate since the total distance of the linestring may not be
a multiple of the preferred distance. This function works on only [Multi]LineString
geome... | def redistribute_vertices(geom, dist):
"""
Redistribute the vertices on a projected LineString or MultiLineString. The distance
argument is only approximate since the total distance of the linestring may not be
a multiple of the preferred distance. This function works on only [Multi]LineString
geome... | https://github.com/gboeing/osmnx/issues/9 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-2-0d3afc68e96a> in <module>()
----> 1 ox.plot_graph(ox.graph_from_place('Modena, Italy'))
/usr/local/lib/python3.4/dist-packages/osmnx/osmnx.py in graph... | TypeError |
def geocode(query):
"""
Geocode a query string to (lat, lon) with the Nominatim geocoder.
Parameters
----------
query : string
the query string to geocode
Returns
-------
point : tuple
the (lat, lon) coordinates returned by the geocoder
"""
# define the paramet... | def geocode(query):
"""
Geocode a query string to (lat, lon) with the Nominatim geocoder.
Parameters
----------
query : string
the query string to geocode
Returns
-------
point : tuple
the (lat, lon) coordinates returned by the geocoder
"""
# send the query to ... | https://github.com/gboeing/osmnx/issues/9 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-2-0d3afc68e96a> in <module>()
----> 1 ox.plot_graph(ox.graph_from_place('Modena, Italy'))
/usr/local/lib/python3.4/dist-packages/osmnx/osmnx.py in graph... | TypeError |
def save_as_osm(
data,
node_tags=settings.osm_xml_node_tags,
node_attrs=settings.osm_xml_node_attrs,
edge_tags=settings.osm_xml_way_tags,
edge_attrs=settings.osm_xml_way_attrs,
oneway=False,
merge_edges=True,
edge_tag_aggs=None,
filename="graph.osm",
folder=None,
):
"""
S... | def save_as_osm(
data,
node_tags=settings.osm_xml_node_tags,
node_attrs=settings.osm_xml_node_attrs,
edge_tags=settings.osm_xml_way_tags,
edge_attrs=settings.osm_xml_way_attrs,
oneway=False,
merge_edges=True,
edge_tag_aggs=None,
filename="graph.osm",
folder=None,
):
"""
S... | https://github.com/gboeing/osmnx/issues/9 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-2-0d3afc68e96a> in <module>()
----> 1 ox.plot_graph(ox.graph_from_place('Modena, Italy'))
/usr/local/lib/python3.4/dist-packages/osmnx/osmnx.py in graph... | TypeError |
def getFileInfo(self, name, pathname):
try:
audio = None
size = os.stat(pathname).st_size
if size > 0:
try:
audio = taglib.File(pathname)
except IOError:
pass
if audio is not None:
bitrateinfo = (
i... | def getFileInfo(self, name, pathname):
try:
audio = None
size = os.stat(pathname).st_size
if size > 0:
try:
audio = taglib.File(pathname)
except IOError:
pass
if audio is not None and audio.length > 0:
fileinfo = (... | https://github.com/Nicotine-Plus/nicotine-plus/issues/527 | Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.7/site-packages/pynicotine/slskproto.py", line 552, in run
conns, connsinprogress, server_socket = self.process_queue(queue, conns, connsin... | struct.error |
def getByteStream(self, fileinfo):
message = slskmessages.SlskMessage()
stream = bytearray()
stream.extend(
bytes([1])
+ message.packObject(fileinfo[0])
+ message.packObject(NetworkLongLongType(fileinfo[1]))
)
if fileinfo[2] is not None:
try:
msgbytes = b... | def getByteStream(self, fileinfo):
message = slskmessages.SlskMessage()
stream = bytearray()
stream.extend(
bytes([1])
+ message.packObject(fileinfo[0])
+ message.packObject(NetworkLongLongType(fileinfo[1]))
)
if fileinfo[2] is not None:
try:
msgbytes = b... | https://github.com/Nicotine-Plus/nicotine-plus/issues/527 | Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.7/site-packages/pynicotine/slskproto.py", line 552, in run
conns, connsinprogress, server_socket = self.process_queue(queue, conns, connsin... | struct.error |
def makeNetworkMessage(self):
filelist = []
for i in self.list:
try:
filelist.append(self.fileindex[str(i)])
except Exception:
pass
queuesize = self.inqueue[0]
msg = bytearray()
msg.extend(
self.packObject(self.user)
+ self.packObject(Network... | def makeNetworkMessage(self):
filelist = []
for i in self.list:
try:
filelist.append(self.fileindex[str(i)])
except Exception:
pass
queuesize = self.inqueue[0]
msg = bytearray()
msg.extend(
self.packObject(self.user)
+ self.packObject(Network... | https://github.com/Nicotine-Plus/nicotine-plus/issues/527 | Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.7/site-packages/pynicotine/slskproto.py", line 552, in run
conns, connsinprogress, server_socket = self.process_queue(queue, conns, connsin... | struct.error |
def makeNetworkMessage(self):
msg = (
self.packObject(1)
+ self.packObject(self.dir)
+ self.packObject(1)
+ self.packObject(self.dir)
+ self.packObject(len(self.list))
)
for i in self.list:
msg = (
msg
+ bytes([1])
+ self.pa... | def makeNetworkMessage(self):
msg = (
self.packObject(1)
+ self.packObject(self.dir)
+ self.packObject(1)
+ self.packObject(self.dir)
+ self.packObject(len(self.list))
)
for i in self.list:
msg = (
msg
+ bytes([1])
+ self.pa... | https://github.com/Nicotine-Plus/nicotine-plus/issues/527 | Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.7/site-packages/pynicotine/slskproto.py", line 552, in run
conns, connsinprogress, server_socket = self.process_queue(queue, conns, connsin... | struct.error |
def GetResultBitrateLength(filesize, attributes):
"""Used to get the audio bitrate and length of search results and
user browse files"""
h_bitrate = ""
h_length = ""
bitrate = 0
# If there are 3 entries in the attribute list
if len(attributes) == 3:
a = attributes
# Somet... | def GetResultBitrateLength(filesize, attributes):
"""Used to get the audio bitrate and length of search results and
user browse files"""
h_bitrate = ""
h_length = ""
bitrate = 0
# If there are 3 entries in the attribute list
if len(attributes) == 3:
a = attributes
# Somet... | https://github.com/Nicotine-Plus/nicotine-plus/issues/527 | Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.7/site-packages/pynicotine/slskproto.py", line 552, in run
conns, connsinprogress, server_socket = self.process_queue(queue, conns, connsin... | struct.error |
def setBuddyShares(self, files, streams, wordindex, fileindex, mtimes):
storable_objects = [
(files, "bsharedfiles", "buddyfiles.db"),
(streams, "bsharedfilesstreams", "buddystreams.db"),
(mtimes, "bsharedmtimes", "buddymtimes.db"),
(wordindex, "bwordindex", "buddywordindex.db"),
... | def setBuddyShares(self, files, streams, wordindex, fileindex, mtimes):
storable_objects = [
(files, "bsharedfiles", "buddyfiles.db"),
(streams, "bsharedfilesstreams", "buddystreams.db"),
(mtimes, "bsharedmtimes", "buddymtimes.db"),
(wordindex, "bwordindex", "buddywordindex.db"),
... | https://github.com/Nicotine-Plus/nicotine-plus/issues/454 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'Klassiek\\Jean Sibelius\\Two Serenades for Violin and Orchestra, Op.69'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ... | KeyError |
def setShares(self, files, streams, wordindex, fileindex, mtimes):
storable_objects = [
(files, "sharedfiles", "files.db"),
(streams, "sharedfilesstreams", "streams.db"),
(mtimes, "sharedmtimes", "mtimes.db"),
(wordindex, "wordindex", "wordindex.db"),
(fileindex, "fileindex",... | def setShares(self, files, streams, wordindex, fileindex, mtimes):
storable_objects = [
(files, "sharedfiles", "files.db"),
(streams, "sharedfilesstreams", "streams.db"),
(mtimes, "sharedmtimes", "mtimes.db"),
(wordindex, "wordindex", "wordindex.db"),
(fileindex, "fileindex",... | https://github.com/Nicotine-Plus/nicotine-plus/issues/454 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'Klassiek\\Jean Sibelius\\Two Serenades for Violin and Orchestra, Op.69'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ... | KeyError |
def _BuddyRescanFinished(self, files, streams, wordindex, fileindex, mtimes):
self.np.config.setBuddyShares(files, streams, wordindex, fileindex, mtimes)
if self.np.config.sections["transfers"]["enablebuddyshares"]:
self.rescan_buddy.set_sensitive(True)
self.browse_buddy_shares.set_sensitive(Tr... | def _BuddyRescanFinished(self, files, streams, wordindex, fileindex, mtimes):
self.np.config.setBuddyShares(files, streams, wordindex, fileindex, mtimes)
self.np.config.writeShares()
if self.np.config.sections["transfers"]["enablebuddyshares"]:
self.rescan_buddy.set_sensitive(True)
self.bro... | https://github.com/Nicotine-Plus/nicotine-plus/issues/454 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'Klassiek\\Jean Sibelius\\Two Serenades for Violin and Orchestra, Op.69'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ... | KeyError |
def _RescanFinished(self, files, streams, wordindex, fileindex, mtimes):
self.np.config.setShares(files, streams, wordindex, fileindex, mtimes)
if self.np.config.sections["transfers"]["shared"]:
self.rescan_public.set_sensitive(True)
self.browse_public_shares.set_sensitive(True)
self.resca... | def _RescanFinished(self, files, streams, wordindex, fileindex, mtimes):
self.np.config.setShares(files, streams, wordindex, fileindex, mtimes)
self.np.config.writeShares()
if self.np.config.sections["transfers"]["shared"]:
self.rescan_public.set_sensitive(True)
self.browse_public_shares.se... | https://github.com/Nicotine-Plus/nicotine-plus/issues/454 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'Klassiek\\Jean Sibelius\\Two Serenades for Violin and Orchestra, Op.69'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ... | KeyError |
def sendNumSharedFoldersFiles(self):
"""
Send number of files in buddy shares if only buddies can
download, and buddy-shares are enabled.
"""
conf = self.config.sections
if conf["transfers"]["enablebuddyshares"] and conf["transfers"]["friendsonly"]:
shared_db = "bsharedfiles"
i... | def sendNumSharedFoldersFiles(self):
"""
Send number of files in buddy shares if only buddies can
download, and buddy-shares are enabled.
"""
conf = self.config.sections
if conf["transfers"]["enablebuddyshares"] and conf["transfers"]["friendsonly"]:
shared_db = "bsharedfiles"
else:
... | https://github.com/Nicotine-Plus/nicotine-plus/issues/454 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'Klassiek\\Jean Sibelius\\Two Serenades for Violin and Orchestra, Op.69'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ... | KeyError |
def RebuildShares(self, msg):
self._RescanShares(msg, "normal", rebuild=True)
| def RebuildShares(self, msg):
self.RescanShares(msg, rebuild=True)
| https://github.com/Nicotine-Plus/nicotine-plus/issues/454 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'Klassiek\\Jean Sibelius\\Two Serenades for Violin and Orchestra, Op.69'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ... | KeyError |
def RescanShares(self, msg, rebuild=False):
self._RescanShares(msg, "normal", rebuild)
| def RescanShares(self, msg, rebuild=False):
try:
files, streams, wordindex, fileindex, mtimes = self.rescandirs(
msg.shared,
self.config.sections["transfers"]["sharedmtimes"],
self.config.sections["transfers"]["sharedfiles"],
self.config.sections["transfers"][... | https://github.com/Nicotine-Plus/nicotine-plus/issues/454 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'Klassiek\\Jean Sibelius\\Two Serenades for Violin and Orchestra, Op.69'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ... | KeyError |
def RebuildBuddyShares(self, msg):
self._RescanShares(msg, "buddy", rebuild=True)
| def RebuildBuddyShares(self, msg):
self.RescanBuddyShares(msg, rebuild=True)
| https://github.com/Nicotine-Plus/nicotine-plus/issues/454 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'Klassiek\\Jean Sibelius\\Two Serenades for Violin and Orchestra, Op.69'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ... | KeyError |
def RescanBuddyShares(self, msg, rebuild=False):
self._RescanShares(msg, "buddy", rebuild)
| def RescanBuddyShares(self, msg, rebuild=False):
files, streams, wordindex, fileindex, mtimes = self.rescandirs(
msg.shared,
self.config.sections["transfers"]["bsharedmtimes"],
self.config.sections["transfers"]["bsharedfiles"],
self.config.sections["transfers"]["bsharedfilesstreams"]... | https://github.com/Nicotine-Plus/nicotine-plus/issues/454 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'Klassiek\\Jean Sibelius\\Two Serenades for Violin and Orchestra, Op.69'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ... | KeyError |
def CompressShares(self, sharestype):
if sharestype == "normal":
streams = self.config.sections["transfers"]["sharedfilesstreams"]
elif sharestype == "buddy":
streams = self.config.sections["transfers"]["bsharedfilesstreams"]
if streams is None:
message = _("ERROR: No %(type)s share... | def CompressShares(self, sharestype):
if sharestype == "normal":
streams = self.config.sections["transfers"]["sharedfilesstreams"]
elif sharestype == "buddy":
streams = self.config.sections["transfers"]["bsharedfilesstreams"]
if streams is None:
message = _("ERROR: No %(type)s share... | https://github.com/Nicotine-Plus/nicotine-plus/issues/454 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'Klassiek\\Jean Sibelius\\Two Serenades for Violin and Orchestra, Op.69'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ... | KeyError |
def processSearchRequest(self, searchterm, user, searchid, direct=0):
if not self.config.sections["searches"]["search_results"]:
# Don't return _any_ results when this option is disabled
return
if searchterm is None:
return
if user == self.config.sections["server"]["login"]:
... | def processSearchRequest(self, searchterm, user, searchid, direct=0):
if not self.config.sections["searches"]["search_results"]:
# Don't return _any_ results when this option is disabled
return
if searchterm is None:
return
if user == self.config.sections["server"]["login"]:
... | https://github.com/Nicotine-Plus/nicotine-plus/issues/454 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'Klassiek\\Jean Sibelius\\Two Serenades for Violin and Orchestra, Op.69'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ... | KeyError |
def rescandirs(
self,
shared,
oldmtimes,
oldfiles,
sharedfilesstreams,
yieldfunction,
progress=None,
name="",
rebuild=False,
):
"""
Check for modified or new files via OS's last mtime on a directory,
or, if rebuild is True, all directories
"""
GLib.idle_add(progr... | def rescandirs(
self,
shared,
oldmtimes,
oldfiles,
sharedfilesstreams,
yieldfunction,
progress=None,
name="",
rebuild=False,
):
"""
Check for modified or new files via OS's last mtime on a directory,
or, if rebuild is True, all directories
"""
# returns dict in f... | https://github.com/Nicotine-Plus/nicotine-plus/issues/454 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'Klassiek\\Jean Sibelius\\Two Serenades for Violin and Orchestra, Op.69'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ... | KeyError |
def getDirsMtimes(self, dirs, yieldcall=None):
list = {}
for folder in dirs:
try:
if self.hiddenCheck({"dir": folder}):
continue
mtime = os.path.getmtime(folder)
list[folder] = mtime
for entry in os.scandir(folder):
if en... | def getDirsMtimes(self, dirs, yieldcall=None):
list = {}
for folder in dirs:
folder = os.path.expanduser(folder.replace("//", "/"))
if self.hiddenCheck({"dir": folder}):
continue
try:
mtime = os.path.getmtime(folder)
except OSError as errtuple:
... | https://github.com/Nicotine-Plus/nicotine-plus/issues/454 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'Klassiek\\Jean Sibelius\\Two Serenades for Violin and Orchestra, Op.69'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ... | KeyError |
def getFilesList(
self, mtimes, oldmtimes, oldlist, yieldcall=None, progress=None, rebuild=False
):
"""Get a list of files with their filelength, bitrate and track length in seconds"""
list = {}
count = 0
lastpercent = 0.0
for folder in mtimes:
try:
count += 1
... | def getFilesList(
self, mtimes, oldmtimes, oldlist, yieldcall=None, progress=None, rebuild=False
):
"""Get a list of files with their filelength, bitrate and track length in seconds"""
list = {}
count = 0
for folder in mtimes:
folder = os.path.expanduser(folder)
virtualdir = self.r... | https://github.com/Nicotine-Plus/nicotine-plus/issues/454 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'Klassiek\\Jean Sibelius\\Two Serenades for Violin and Orchestra, Op.69'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ... | KeyError |
def getFileInfo(self, name, pathname):
try:
size = os.stat(pathname).st_size
info = metadata.detect(pathname)
if info:
# Sometimes the duration (time) or the bitrate of the file is unknown
if info["time"] is None or info["bitrate"] is None:
fileinfo =... | def getFileInfo(self, name, pathname):
try:
size = os.path.getsize(pathname)
info = metadata.detect(pathname)
if info:
# Sometimes the duration (time) or the bitrate of the file is unknown
if info["time"] is None or info["bitrate"] is None:
fileinfo =... | https://github.com/Nicotine-Plus/nicotine-plus/issues/454 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'Klassiek\\Jean Sibelius\\Two Serenades for Violin and Orchestra, Op.69'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ... | KeyError |
def getFilesStreams(
self, mtimes, oldmtimes, oldstreams, newsharedfiles, rebuild=False, yieldcall=None
):
streams = {}
for folder in mtimes:
virtualdir = self.real2virtual(folder)
if self.hiddenCheck({"dir": folder}):
continue
if not rebuild and folder in oldmtimes:
... | def getFilesStreams(
self, mtimes, oldmtimes, oldstreams, newsharedfiles, rebuild=False, yieldcall=None
):
streams = {}
for directory in list(mtimes.keys()):
virtualdir = self.real2virtual(directory)
if self.hiddenCheck({"dir": directory}):
continue
if not rebuild and ... | https://github.com/Nicotine-Plus/nicotine-plus/issues/454 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'Klassiek\\Jean Sibelius\\Two Serenades for Violin and Orchestra, Op.69'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ... | KeyError |
def getDirStream(self, dir):
stream = bytearray()
stream.extend(slskmessages.SlskMessage().packObject(NetworkIntType(len(dir))))
for file_and_meta in dir:
stream.extend(self.getByteStream(file_and_meta))
return stream
| def getDirStream(self, dir):
msg = slskmessages.SlskMessage()
stream = msg.packObject(NetworkIntType(len(dir)))
for file_and_meta in dir:
stream += self.getByteStream(file_and_meta)
return stream
| https://github.com/Nicotine-Plus/nicotine-plus/issues/454 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'Klassiek\\Jean Sibelius\\Two Serenades for Violin and Orchestra, Op.69'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ... | KeyError |
def getByteStream(self, fileinfo):
message = slskmessages.SlskMessage()
stream = bytearray()
stream.extend(
bytes([1])
+ message.packObject(fileinfo[0])
+ message.packObject(NetworkLongLongType(fileinfo[1]))
)
if fileinfo[2] is not None:
try:
msgbytes = b... | def getByteStream(self, fileinfo):
message = slskmessages.SlskMessage()
stream = (
bytes([1])
+ message.packObject(fileinfo[0])
+ message.packObject(NetworkLongLongType(fileinfo[1]))
)
if fileinfo[2] is not None:
try:
msgbytes = b""
msgbytes += me... | https://github.com/Nicotine-Plus/nicotine-plus/issues/454 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'Klassiek\\Jean Sibelius\\Two Serenades for Violin and Orchestra, Op.69'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ... | KeyError |
def getFilesIndex(
self, mtimes, oldmtimes, newsharedfiles, yieldcall=None, progress=None
):
wordindex = defaultdict(list)
fileindex = []
index = 0
count = len(mtimes)
lastpercent = 0.0
for directory in mtimes:
virtualdir = self.real2virtual(directory)
count += 1
if... | def getFilesIndex(
self, mtimes, oldmtimes, shareddirs, newsharedfiles, yieldcall=None, progress=None
):
wordindex = defaultdict(list)
fileindex = {}
index = 0
count = 0
for directory in mtimes:
virtualdir = self.real2virtual(directory)
if progress:
percent = float(... | https://github.com/Nicotine-Plus/nicotine-plus/issues/454 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'Klassiek\\Jean Sibelius\\Two Serenades for Violin and Orchestra, Op.69'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ... | KeyError |
def addToShared(self, name):
"""Add a file to the normal shares database"""
config = self.config.sections
if not config["transfers"]["sharedownloaddir"]:
return
shared = config["transfers"]["sharedfiles"]
sharedstreams = config["transfers"]["sharedfilesstreams"]
wordindex = config["tra... | def addToShared(self, name):
"""Add a file to the normal shares database"""
config = self.config.sections
if not config["transfers"]["sharedownloaddir"]:
return
shared = config["transfers"]["sharedfiles"]
sharedstreams = config["transfers"]["sharedfilesstreams"]
wordindex = config["tra... | https://github.com/Nicotine-Plus/nicotine-plus/issues/454 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'Klassiek\\Jean Sibelius\\Two Serenades for Violin and Orchestra, Op.69'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ... | KeyError |
def addToIndex(self, wordindex, fileindex, words, dir, fileinfo):
index = len(fileindex)
for i in words:
if i not in wordindex:
wordindex[i] = [index]
else:
wordindex[i] = wordindex[i] + [index]
fileindex.append((os.path.join(dir, fileinfo[0]),) + fileinfo[1:])
| def addToIndex(self, wordindex, fileindex, words, dir, fileinfo):
index = len(list(fileindex.keys()))
for i in words:
if i not in wordindex:
wordindex[i] = [index]
else:
wordindex[i] = wordindex[i] + [index]
fileindex[str(index)] = (os.path.join(dir, fileinfo[0]),) + ... | https://github.com/Nicotine-Plus/nicotine-plus/issues/454 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'Klassiek\\Jean Sibelius\\Two Serenades for Violin and Orchestra, Op.69'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ... | KeyError |
def OnSelectUserResults(self, widget):
if len(self.selected_users) == 0:
return
selected_user = widget.get_parent().user
sel = self.ResultsList.get_selection()
fmodel = self.ResultsList.get_model()
sel.unselect_all()
iter = fmodel.get_iter_first()
SelectUserRowIter(fmodel, sel, 1... | def OnSelectUserResults(self, widget):
if len(self.selected_users) == 0:
return
selected_user = widget.get_parent().user
sel = self.ResultsList.get_selection()
fmodel = self.ResultsList.get_model()
sel.unselect_all()
iter = self.resultsmodel.get_iter_first()
self.UserRowIter(fmode... | https://github.com/Nicotine-Plus/nicotine-plus/issues/360 | Traceback (most recent call last):
File "/home/user/projects/nicotine-plus/pynicotine/gtkgui/frame.py", line 1297, in OnNetworkEvent
self.np.events[i.__class__](i)
File "/home/user/projects/nicotine-plus/pynicotine/pynicotine.py", line 1556, in QueueUpload
self.transfers.QueueUpload(msg)
File "/home/user/projects/nicot... | AttributeError |
def transferFile(
self,
direction,
user,
filename,
path="",
transfer=None,
size=None,
bitrate=None,
length=None,
realfilename=None,
):
"""Get a single file. path is a local path. if transfer object is
not None, update it, otherwise create a new one."""
if transfer is ... | def transferFile(
self,
direction,
user,
filename,
path="",
transfer=None,
size=None,
bitrate=None,
length=None,
realfilename=None,
):
"""Get a single file. path is a local path. if transfer object is
not None, update it, otherwise create a new one."""
if transfer is ... | https://github.com/Nicotine-Plus/nicotine-plus/issues/360 | Traceback (most recent call last):
File "/home/user/projects/nicotine-plus/pynicotine/gtkgui/frame.py", line 1297, in OnNetworkEvent
self.np.events[i.__class__](i)
File "/home/user/projects/nicotine-plus/pynicotine/pynicotine.py", line 1556, in QueueUpload
self.transfers.QueueUpload(msg)
File "/home/user/projects/nicot... | AttributeError |
def _TransferRequestUploads(self, msg, user, conn, addr):
# Is user alllowed to download?
checkuser, reason = self.eventprocessor.CheckUser(user, addr)
if not checkuser:
return slskmessages.TransferResponse(conn, 0, reason=reason, req=msg.req)
# Do we actually share that file with the world?
... | def _TransferRequestUploads(self, msg, user, conn, addr):
# Is user alllowed to download?
checkuser, reason = self.eventprocessor.CheckUser(user, addr)
if not checkuser:
return slskmessages.TransferResponse(conn, 0, reason=reason, req=msg.req)
# Do we actually share that file with the world?
... | https://github.com/Nicotine-Plus/nicotine-plus/issues/360 | Traceback (most recent call last):
File "/home/user/projects/nicotine-plus/pynicotine/gtkgui/frame.py", line 1297, in OnNetworkEvent
self.np.events[i.__class__](i)
File "/home/user/projects/nicotine-plus/pynicotine/pynicotine.py", line 1556, in QueueUpload
self.transfers.QueueUpload(msg)
File "/home/user/projects/nicot... | AttributeError |
def QueueUpload(self, msg):
"""Peer remotely(?) queued a download (upload here)"""
user = None
for i in self.peerconns:
if i.conn is msg.conn.conn:
user = i.username
if user is None:
return
addr = msg.conn.addr[0]
realpath = self.eventprocessor.shares.virtual2real(... | def QueueUpload(self, msg):
"""Peer remotely(?) queued a download (upload here)"""
user = None
for i in self.peerconns:
if i.conn is msg.conn.conn:
user = i.username
if user is None:
return
addr = msg.conn.addr[0]
realpath = self.eventprocessor.shares.virtual2real(... | https://github.com/Nicotine-Plus/nicotine-plus/issues/360 | Traceback (most recent call last):
File "/home/user/projects/nicotine-plus/pynicotine/gtkgui/frame.py", line 1297, in OnNetworkEvent
self.np.events[i.__class__](i)
File "/home/user/projects/nicotine-plus/pynicotine/pynicotine.py", line 1556, in QueueUpload
self.transfers.QueueUpload(msg)
File "/home/user/projects/nicot... | AttributeError |
def readConfig(self):
self.config_lock.acquire()
self.sections["transfers"]["downloads"] = []
if exists(os.path.join(self.data_dir, "transfers.pickle")):
# <1.2.13 stored transfers inside the main config
try:
handle = open(os.path.join(self.data_dir, "transfers.pickle"), "rb")
... | def readConfig(self):
self.config_lock.acquire()
self.sections["transfers"]["downloads"] = []
if exists(os.path.join(self.data_dir, "transfers.pickle")):
# <1.2.13 stored transfers inside the main config
try:
handle = open(os.path.join(self.data_dir, "transfers.pickle"), "rb")
... | https://github.com/Nicotine-Plus/nicotine-plus/issues/267 | Thu 07:58 Nicotine+ supports a country code blocker. This requires a (GPL'ed) library called GeoIP. You can find it here: C library: https://github.com/maxmind/geoip-api-c Python
bindings: https://github.com/maxmind/geoip-api-python (the python bindings require the C library)
Traceback (most recent call last):
Fi... | SystemError |
def clearShares(
self,
sharedfiles,
bsharedfiles,
sharedfilesstreams,
bsharedfilesstreams,
wordindex,
bwordindex,
fileindex,
bfileindex,
sharedmtimes,
bsharedmtimes,
):
try:
if sharedfiles:
sharedfiles.close()
try:
os.unlink(os.path... | def clearShares(
self,
sharedfiles,
bsharedfiles,
sharedfilesstreams,
bsharedfilesstreams,
wordindex,
bwordindex,
fileindex,
bfileindex,
sharedmtimes,
bsharedmtimes,
):
try:
if sharedfiles:
sharedfiles.close()
try:
os.unlink(os.path... | https://github.com/Nicotine-Plus/nicotine-plus/issues/267 | Thu 07:58 Nicotine+ supports a country code blocker. This requires a (GPL'ed) library called GeoIP. You can find it here: C library: https://github.com/maxmind/geoip-api-c Python
bindings: https://github.com/maxmind/geoip-api-python (the python bindings require the C library)
Traceback (most recent call last):
Fi... | SystemError |
def writeDownloadQueue(self):
self.config_lock.acquire()
realfile = os.path.join(self.data_dir, "transfers.pickle")
tmpfile = realfile + ".tmp"
backupfile = realfile + " .backup"
try:
handle = open(tmpfile, "wb")
except Exception as inst:
log.addwarning(
_("Something ... | def writeDownloadQueue(self):
self.config_lock.acquire()
realfile = os.path.join(self.data_dir, "transfers.pickle")
tmpfile = realfile + ".tmp"
backupfile = realfile + " .backup"
try:
handle = open(tmpfile, "wb")
except Exception as inst:
log.addwarning(
_("Something ... | https://github.com/Nicotine-Plus/nicotine-plus/issues/267 | Thu 07:58 Nicotine+ supports a country code blocker. This requires a (GPL'ed) library called GeoIP. You can find it here: C library: https://github.com/maxmind/geoip-api-c Python
bindings: https://github.com/maxmind/geoip-api-python (the python bindings require the C library)
Traceback (most recent call last):
Fi... | SystemError |
def _storeObjects(self, storable_objects):
for source, destination, filename in storable_objects:
self.sections["transfers"][destination].close()
self.sections["transfers"][destination] = shelve.open(
os.path.join(self.data_dir, filename),
flag="n",
protocol=pickl... | def _storeObjects(self, storable_objects):
for source, destination, filename in storable_objects:
self.sections["transfers"][destination].close()
self.sections["transfers"][destination] = shelve.open(
os.path.join(self.data_dir, filename), flag="n"
)
for key, value in so... | https://github.com/Nicotine-Plus/nicotine-plus/issues/267 | Thu 07:58 Nicotine+ supports a country code blocker. This requires a (GPL'ed) library called GeoIP. You can find it here: C library: https://github.com/maxmind/geoip-api-c Python
bindings: https://github.com/maxmind/geoip-api-python (the python bindings require the C library)
Traceback (most recent call last):
Fi... | SystemError |
def writeAliases(self):
self.config_lock.acquire()
f = open(self.filename + ".alias", "wb")
pickle.dump(self.aliases, f, protocol=pickle.HIGHEST_PROTOCOL)
f.close()
self.config_lock.release()
| def writeAliases(self):
self.config_lock.acquire()
f = open(self.filename + ".alias", "wb")
pickle.dump(self.aliases, f, 1)
f.close()
self.config_lock.release()
| https://github.com/Nicotine-Plus/nicotine-plus/issues/267 | Thu 07:58 Nicotine+ supports a country code blocker. This requires a (GPL'ed) library called GeoIP. You can find it here: C library: https://github.com/maxmind/geoip-api-c Python
bindings: https://github.com/maxmind/geoip-api-python (the python bindings require the C library)
Traceback (most recent call last):
Fi... | SystemError |
def CountUsers(self):
numusers = len(self.users)
if numusers > 1:
self.LabelPeople.show()
self.LabelPeople.set_text(_("%i people in room") % numusers)
elif numusers == 1:
self.LabelPeople.show()
self.LabelPeople.set_text(_("You are alone"))
else:
self.LabelPeople.... | def CountUsers(self):
numusers = len(list(self.users.keys()))
if numusers > 1:
self.LabelPeople.show()
self.LabelPeople.set_text(_("%i people in room") % numusers)
elif numusers == 1:
self.LabelPeople.show()
self.LabelPeople.set_text(_("You are alone"))
else:
self... | https://github.com/Nicotine-Plus/nicotine-plus/issues/267 | Thu 07:58 Nicotine+ supports a country code blocker. This requires a (GPL'ed) library called GeoIP. You can find it here: C library: https://github.com/maxmind/geoip-api-c Python
bindings: https://github.com/maxmind/geoip-api-python (the python bindings require the C library)
Traceback (most recent call last):
Fi... | SystemError |
def __init__(self, frame, message="", data=None, modal=True, Search=True):
gtk.Dialog.__init__(self)
self.connect("destroy", self.quit)
self.connect("delete-event", self.quit)
self.nicotine = frame
if modal:
self.set_modal(True)
self.Search = Search
self.box = gtk.VBox(spacing=10)... | def __init__(self, frame, message="", data=None, modal=True, Search=True):
gtk.Dialog.__init__(self)
self.connect("destroy", self.quit)
self.connect("delete-event", self.quit)
self.nicotine = frame
if modal:
self.set_modal(True)
self.Search = Search
self.box = gtk.VBox(spacing=10)... | https://github.com/Nicotine-Plus/nicotine-plus/issues/267 | Thu 07:58 Nicotine+ supports a country code blocker. This requires a (GPL'ed) library called GeoIP. You can find it here: C library: https://github.com/maxmind/geoip-api-c Python
bindings: https://github.com/maxmind/geoip-api-python (the python bindings require the C library)
Traceback (most recent call last):
Fi... | SystemError |
def OnPrevious(self, widget):
if len(self.data) > 1:
_list = list(self.data.keys())
if self.current not in _list:
ix -= 1 # noqa: F821
else:
ix = _list.index(self.current)
ix -= 1
if ix < 0:
ix = -1
elif ix >= len... | def OnPrevious(self, widget):
if len(list(self.data.keys())) > 1:
_list = list(self.data.keys())
if self.current not in _list:
ix -= 1 # noqa: F821
else:
ix = _list.index(self.current)
ix -= 1
if ix < 0:
ix = -1
e... | https://github.com/Nicotine-Plus/nicotine-plus/issues/267 | Thu 07:58 Nicotine+ supports a country code blocker. This requires a (GPL'ed) library called GeoIP. You can find it here: C library: https://github.com/maxmind/geoip-api-c Python
bindings: https://github.com/maxmind/geoip-api-python (the python bindings require the C library)
Traceback (most recent call last):
Fi... | SystemError |
def OnNext(self, widget):
if len(self.data) > 1:
_list = list(self.data.keys())
if self.current not in _list:
ix += 1 # noqa: F821
else:
ix = _list.index(self.current)
ix += 1
if ix < 0:
ix = -1
elif ix >= len(_li... | def OnNext(self, widget):
if len(list(self.data.keys())) > 1:
_list = list(self.data.keys())
if self.current not in _list:
ix += 1 # noqa: F821
else:
ix = _list.index(self.current)
ix += 1
if ix < 0:
ix = -1
elif ... | https://github.com/Nicotine-Plus/nicotine-plus/issues/267 | Thu 07:58 Nicotine+ supports a country code blocker. This requires a (GPL'ed) library called GeoIP. You can find it here: C library: https://github.com/maxmind/geoip-api-c Python
bindings: https://github.com/maxmind/geoip-api-python (the python bindings require the C library)
Traceback (most recent call last):
Fi... | SystemError |
def Display(self, item):
if item not in self.data:
return
if not self.Search:
self.Immediate.hide()
self.Position.hide()
self.Country.hide()
self.Queue.hide()
self.Immediate.hide()
self.ImmediateLabel.hide()
self.PositionLabel.hide()
self.... | def Display(self, item):
if item not in self.data:
return
if not self.Search:
self.Immediate.hide()
self.Position.hide()
self.Country.hide()
self.Queue.hide()
self.Immediate.hide()
self.ImmediateLabel.hide()
self.PositionLabel.hide()
self.... | https://github.com/Nicotine-Plus/nicotine-plus/issues/267 | Thu 07:58 Nicotine+ supports a country code blocker. This requires a (GPL'ed) library called GeoIP. You can find it here: C library: https://github.com/maxmind/geoip-api-c Python
bindings: https://github.com/maxmind/geoip-api-python (the python bindings require the C library)
Traceback (most recent call last):
Fi... | SystemError |
def UpdateDownloadFilters(self):
proccessedfilters = []
outfilter = "(\\\\("
failed = {}
df = self.np.config.sections["transfers"]["downloadfilters"]
df.sort()
# Get Filters from config file and check their escaped status
# Test if they are valid regular expressions and save error messages
... | def UpdateDownloadFilters(self):
proccessedfilters = []
outfilter = "(\\\\("
failed = {}
df = self.np.config.sections["transfers"]["downloadfilters"]
df.sort()
# Get Filters from config file and check their escaped status
# Test if they are valid regular expressions and save error messages
... | https://github.com/Nicotine-Plus/nicotine-plus/issues/267 | Thu 07:58 Nicotine+ supports a country code blocker. This requires a (GPL'ed) library called GeoIP. You can find it here: C library: https://github.com/maxmind/geoip-api-c Python
bindings: https://github.com/maxmind/geoip-api-python (the python bindings require the C library)
Traceback (most recent call last):
Fi... | SystemError |
def OnVerifyFilter(self, widget):
outfilter = "(\\\\("
df = list(self.filtersiters.keys())
df.sort()
proccessedfilters = []
failed = {}
for filter in df:
iter = self.filtersiters[filter]
dfilter = self.filterlist.get_value(iter, 0)
escaped = self.filterlist.get_value(i... | def OnVerifyFilter(self, widget):
outfilter = "(\\\\("
df = list(self.filtersiters.keys())
df.sort()
proccessedfilters = []
failed = {}
for filter in df:
iter = self.filtersiters[filter]
dfilter = self.filterlist.get_value(iter, 0)
escaped = self.filterlist.get_value(i... | https://github.com/Nicotine-Plus/nicotine-plus/issues/267 | Thu 07:58 Nicotine+ supports a country code blocker. This requires a (GPL'ed) library called GeoIP. You can find it here: C library: https://github.com/maxmind/geoip-api-c Python
bindings: https://github.com/maxmind/geoip-api-python (the python bindings require the C library)
Traceback (most recent call last):
Fi... | SystemError |
def OnSave(self, widget):
sharesdir = os.path.join(self.data_dir, "usershares")
try:
if not os.path.exists(sharesdir):
os.mkdir(sharesdir)
except Exception as msg:
error = _(
"Can't create directory '%(folder)s', reported error: %(error)s"
% {"folder": sh... | def OnSave(self, widget):
sharesdir = os.path.join(self.data_dir, "usershares")
try:
if not os.path.exists(sharesdir):
os.mkdir(sharesdir)
except Exception as msg:
error = _(
"Can't create directory '%(folder)s', reported error: %(error)s"
% {"folder": sh... | https://github.com/Nicotine-Plus/nicotine-plus/issues/267 | Thu 07:58 Nicotine+ supports a country code blocker. This requires a (GPL'ed) library called GeoIP. You can find it here: C library: https://github.com/maxmind/geoip-api-c Python
bindings: https://github.com/maxmind/geoip-api-python (the python bindings require the C library)
Traceback (most recent call last):
Fi... | SystemError |
def makeNetworkMessage(self, nozlib=0, rebuild=False):
# Elaborate hack, to save CPU
# Store packed message contents in self.built, and use
# instead of repacking it, unless rebuild is True
if not rebuild and self.built is not None:
return self.built
msg = b""
msg = msg + self.packObject... | def makeNetworkMessage(self, nozlib=0, rebuild=False):
# Elaborate hack, to save CPU
# Store packed message contents in self.built, and use
# instead of repacking it, unless rebuild is True
if not rebuild and self.built is not None:
return self.built
msg = b""
msg = msg + self.packObject... | https://github.com/Nicotine-Plus/nicotine-plus/issues/267 | Thu 07:58 Nicotine+ supports a country code blocker. This requires a (GPL'ed) library called GeoIP. You can find it here: C library: https://github.com/maxmind/geoip-api-c Python
bindings: https://github.com/maxmind/geoip-api-python (the python bindings require the C library)
Traceback (most recent call last):
Fi... | SystemError |
async def demo(docker):
try:
await docker.images.get("alpine:latest")
except DockerError as e:
if e.status == 404:
await docker.pull("alpine:latest")
else:
print("Error retrieving alpine:latest image.")
return
subscriber = docker.events.subscribe(... | async def demo(docker):
try:
await docker.images.get("alpine:latest")
except DockerError as e:
if e.status == 404:
await docker.pull("alpine:latest")
else:
print("Error retrieving alpine:latest image.")
return
subscriber = docker.events.subscribe(... | https://github.com/aio-libs/aiodocker/issues/34 | ^CTraceback (most recent call last):
File "/tmp/events.py", line 24, in <module>
loop.run_until_complete(demo(docker))
File "/usr/lib/python3.6/asyncio/base_events.py", line 454, in run_until_complete
self.run_forever()
File "/usr/lib/python3.6/asyncio/base_events.py", line 421, in run_forever
self._run_once()
File "/u... | ConnectionRefusedError |
def main():
if USING_ARGPARSE:
parser = argparse.ArgumentParser(
description="Create views from nmap and passive databases.",
parents=[DB().argparser],
)
else:
parser = optparse.OptionParser(
description="Create views from nmap and passive databases."
... | def main():
if USING_ARGPARSE:
parser = argparse.ArgumentParser(
description="Create views from nmap and passive databases."
)
else:
parser = optparse.OptionParser(
description="Create views from nmap and passive databases."
)
parser.parse_args_ori... | https://github.com/cea-sec/ivre/issues/569 | $ ivre db2view
Traceback (most recent call last):
File "/usr/bin/ivre", line 84, in <module>
main()
File "/usr/bin/ivre", line 56, in main
tools.get_command(possible_commands[0])()
File "/usr/lib/python3.7/site-packages/ivre/tools/db2view.py", line 90, in main
fltnmap = db.nmap.parse_args(args)
File "/usr/lib/python3.7... | AttributeError |
def _read_nmap_probes():
global _NMAP_CUR_PROBE, _NMAP_PROBES_POPULATED
_NMAP_CUR_PROBE = None
def parse_line(line):
global _NMAP_PROBES, _NMAP_CUR_PROBE
if line.startswith(b"match "):
line = line[6:]
soft = False
elif line.startswith(b"softmatch "):
... | def _read_nmap_probes():
global _NMAP_CUR_PROBE, _NMAP_PROBES_POPULATED
_NMAP_CUR_PROBE = None
def parse_line(line):
global _NMAP_PROBES, _NMAP_CUR_PROBE
if line.startswith(b"match "):
line = line[6:]
soft = False
elif line.startswith(b"softmatch "):
... | https://github.com/cea-sec/ivre/issues/418 | user@workstation:~/masscan/bin$ ivre nmap2db --archive --c MASSCAN-BANNER -s SCANNER BANNER.xml
WARNING:ivre:Exception (file 'BANNER.xml')
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/ivre/tools/scan2db.py", line 122, in main
merge=args.merge, masscan_probes=args.masscan_probes,
File ... | UnicodeDecodeError |
def parse_line(line):
global _NMAP_PROBES, _NMAP_CUR_PROBE
if line.startswith(b"match "):
line = line[6:]
soft = False
elif line.startswith(b"softmatch "):
line = line[10:]
soft = True
elif line.startswith(b"Probe "):
_NMAP_CUR_PROBE = []
proto, name, prob... | def parse_line(line):
global _NMAP_PROBES, _NMAP_CUR_PROBE
if line.startswith(b"match "):
line = line[6:]
soft = False
elif line.startswith(b"softmatch "):
line = line[10:]
soft = True
elif line.startswith(b"Probe "):
_NMAP_CUR_PROBE = []
proto, name, prob... | https://github.com/cea-sec/ivre/issues/418 | user@workstation:~/masscan/bin$ ivre nmap2db --archive --c MASSCAN-BANNER -s SCANNER BANNER.xml
WARNING:ivre:Exception (file 'BANNER.xml')
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/ivre/tools/scan2db.py", line 122, in main
merge=args.merge, masscan_probes=args.masscan_probes,
File ... | UnicodeDecodeError |
def masscan_post_http(self, script):
header = re.search(
re.escape(b"\nServer:") + b"[ \\\t]*([^\\\r\\\n]+)\\\r?(?:\\\n|$)",
script["masscan"]["raw"],
)
if header is None:
return
header = header.groups()[0]
self._curport.setdefault("scripts", []).append(
{
... | def masscan_post_http(self, script):
header = re.search(
re.escape("\nServer:") + "[ \\\t]*([^\\\r\\\n]+)\\\r?(?:\\\n|$)",
script["masscan"]["raw"],
)
if header is None:
return
header = header.groups()[0]
self._curport.setdefault("scripts", []).append(
{
"... | https://github.com/cea-sec/ivre/issues/418 | user@workstation:~/masscan/bin$ ivre nmap2db --archive --c MASSCAN-BANNER -s SCANNER BANNER.xml
WARNING:ivre:Exception (file 'BANNER.xml')
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/ivre/tools/scan2db.py", line 122, in main
merge=args.merge, masscan_probes=args.masscan_probes,
File ... | UnicodeDecodeError |
def feed_all(self, masterid):
for scanid in self.get_scans():
try:
self.feed(masterid, scanid)
except LockError:
utils.LOGGER.error(
"Lock error - is another daemon process running?",
exc_info=True,
)
| def feed_all(self, masterid):
for scanid in self.get_scans():
self.feed(masterid, scanid)
| https://github.com/cea-sec/ivre/issues/403 | root@ivreclient:~# ivre runscansagentdb --daemon
Traceback (most recent call last):
File "/usr/local/bin/ivre", line 78, in <module>
main()
File "/usr/local/bin/ivre", line 51, in main
tools.get_command(possible_commands[0])()
File "/usr/local/lib/python2.7/dist-packages/ivre/tools/runscansagentdb.py", line 231, in mai... | TypeError |
def feed(self, masterid, scanid):
scan = self.lock_scan(scanid)
# TODO: handle "onhold" targets
target = self.get_scan_target(scanid)
try:
for agentid in scan["agents"]:
if self.get_agent(agentid)["master"] == masterid:
for _ in range(self.may_receive(agentid)):
... | def feed(self, masterid, scanid):
scan = self.lock_scan(scanid)
if scan is None:
raise StandardError("Could not acquire lock for scan %s" % scanid)
# TODO: handle "onhold" targets
target = self.get_scan_target(scanid)
try:
for agentid in scan["agents"]:
if self.get_agent(... | https://github.com/cea-sec/ivre/issues/403 | root@ivreclient:~# ivre runscansagentdb --daemon
Traceback (most recent call last):
File "/usr/local/bin/ivre", line 78, in <module>
main()
File "/usr/local/bin/ivre", line 51, in main
tools.get_command(possible_commands[0])()
File "/usr/local/lib/python2.7/dist-packages/ivre/tools/runscansagentdb.py", line 231, in mai... | TypeError |
def lock_scan(self, scanid):
"""Acquire lock for scanid. Returns the new scan object on success,
and raises a LockError on failure.
"""
lockid = uuid.uuid1()
scan = self._lock_scan(scanid, None, lockid.bytes)
if scan["lock"] is not None:
# This might be a bug in uuid module, Python 2 on... | def lock_scan(self, scanid):
lockid = uuid.uuid1()
scan = self._lock_scan(scanid, None, lockid.bytes)
if scan["lock"] is not None:
# This might be a bug in uuid module, Python 2 only
## File "/opt/python/2.6.9/lib/python2.6/uuid.py", line 145, in __init__
## int = long(('%02x'*16... | https://github.com/cea-sec/ivre/issues/403 | root@ivreclient:~# ivre runscansagentdb --daemon
Traceback (most recent call last):
File "/usr/local/bin/ivre", line 78, in <module>
main()
File "/usr/local/bin/ivre", line 51, in main
tools.get_command(possible_commands[0])()
File "/usr/local/lib/python2.7/dist-packages/ivre/tools/runscansagentdb.py", line 231, in mai... | TypeError |
def unlock_scan(self, scan):
"""Release lock for scanid. Returns True on success, and raises a
LockError on failure.
"""
if scan.get("lock") is None:
raise LockError("Cannot release lock for %r: scan is not locked" % scan["_id"])
scan = self._lock_scan(scan["_id"], scan["lock"].bytes, None)... | def unlock_scan(self, scan):
if scan.get("lock") is None:
raise ValueError("Scan is not locked")
scan = self._lock_scan(scan["_id"], scan["lock"].bytes, None)
return scan["lock"] is None
| https://github.com/cea-sec/ivre/issues/403 | root@ivreclient:~# ivre runscansagentdb --daemon
Traceback (most recent call last):
File "/usr/local/bin/ivre", line 78, in <module>
main()
File "/usr/local/bin/ivre", line 51, in main
tools.get_command(possible_commands[0])()
File "/usr/local/lib/python2.7/dist-packages/ivre/tools/runscansagentdb.py", line 231, in mai... | TypeError |
def _lock_scan(self, scanid, oldlockid, newlockid):
"""Change lock for scanid from oldlockid to newlockid. Returns the new
scan object on success, and raises a LockError on failure.
"""
if oldlockid is not None:
oldlockid = bson.Binary(oldlockid)
if newlockid is not None:
newlockid ... | def _lock_scan(self, scanid, oldlockid, newlockid):
if oldlockid is not None:
oldlockid = bson.Binary(oldlockid)
if newlockid is not None:
newlockid = bson.Binary(newlockid)
scan = self.db[self.colname_scans].find_and_modify(
{
"_id": scanid,
"lock": oldlockid... | https://github.com/cea-sec/ivre/issues/403 | root@ivreclient:~# ivre runscansagentdb --daemon
Traceback (most recent call last):
File "/usr/local/bin/ivre", line 78, in <module>
main()
File "/usr/local/bin/ivre", line 51, in main
tools.get_command(possible_commands[0])()
File "/usr/local/lib/python2.7/dist-packages/ivre/tools/runscansagentdb.py", line 231, in mai... | TypeError |
def display_scan(scan, verbose=True):
scan["target"] = ivre.db.db.agent.get_scan_target(scan["_id"])
print("scan:")
if verbose:
print(" - id: %s" % scan["_id"])
print(" - categories:")
for category in scan["target"].target.infos["categories"]:
print(" - %s" % category)
print... | def display_scan(scan, verbose=True):
scan["target"] = ivre.db.db.agent.get_scan_target(scan["_id"])
print("scan:")
if verbose:
print(" - id: %s" % scan["_id"])
print(" - categories:")
for category in scan["target"].target.infos["categories"]:
print(" - %s" % category)
print... | https://github.com/cea-sec/ivre/issues/403 | root@ivreclient:~# ivre runscansagentdb --daemon
Traceback (most recent call last):
File "/usr/local/bin/ivre", line 78, in <module>
main()
File "/usr/local/bin/ivre", line 51, in main
tools.get_command(possible_commands[0])()
File "/usr/local/lib/python2.7/dist-packages/ivre/tools/runscansagentdb.py", line 231, in mai... | TypeError |
def main():
try:
import argparse
parser = argparse.ArgumentParser(
description=__doc__, parents=[ivre.target.argparser]
)
except ImportError:
import optparse
parser = optparse.OptionParser(description=__doc__)
for args, kargs in ivre.target.argparser... | def main():
try:
import argparse
parser = argparse.ArgumentParser(
description=__doc__, parents=[ivre.target.argparser]
)
except ImportError:
import optparse
parser = optparse.OptionParser(description=__doc__)
for args, kargs in ivre.target.argparser... | https://github.com/cea-sec/ivre/issues/403 | root@ivreclient:~# ivre runscansagentdb --daemon
Traceback (most recent call last):
File "/usr/local/bin/ivre", line 78, in <module>
main()
File "/usr/local/bin/ivre", line 51, in main
tools.get_command(possible_commands[0])()
File "/usr/local/lib/python2.7/dist-packages/ivre/tools/runscansagentdb.py", line 231, in mai... | TypeError |
def terminate(signum, _):
global WANT_DOWN
ivre.utils.LOGGER.info(
"shutdown: got signal %d, will halt after current task.",
signum,
)
WANT_DOWN = True
| def terminate(signum, _):
global WANT_DOWN
print("SHUTDOWN: got signal %d, will halt after current task." % signum)
WANT_DOWN = True
| https://github.com/cea-sec/ivre/issues/403 | root@ivreclient:~# ivre runscansagentdb --daemon
Traceback (most recent call last):
File "/usr/local/bin/ivre", line 78, in <module>
main()
File "/usr/local/bin/ivre", line 51, in main
tools.get_command(possible_commands[0])()
File "/usr/local/lib/python2.7/dist-packages/ivre/tools/runscansagentdb.py", line 231, in mai... | TypeError |
def terminate_now(signum, _):
ivre.utils.LOGGER.info("shutdown: got signal %d, halting now.", signum)
exit()
| def terminate_now(signum, _):
print("SHUTDOWN: got signal %d, halting now." % signum)
exit()
| https://github.com/cea-sec/ivre/issues/403 | root@ivreclient:~# ivre runscansagentdb --daemon
Traceback (most recent call last):
File "/usr/local/bin/ivre", line 78, in <module>
main()
File "/usr/local/bin/ivre", line 51, in main
tools.get_command(possible_commands[0])()
File "/usr/local/lib/python2.7/dist-packages/ivre/tools/runscansagentdb.py", line 231, in mai... | TypeError |
def endElement(self, name):
if name == "nmaprun":
self._curscan = None
elif name == "host":
# masscan -oX output has no "state" tag
if (
self._curhost.get("state", "up") == "up"
and (not self._needports or "ports" in self._curhost)
and (
... | def endElement(self, name):
if name == "nmaprun":
self._curscan = None
elif name == "host":
# masscan -oX output has no "state" tag
if (
self._curhost.get("state", "up") == "up"
and (not self._needports or "ports" in self._curhost)
and (
... | https://github.com/cea-sec/ivre/issues/406 | WARNING:ivre:Exception (file './scans/NET-10.10.10.10_32/up/10/10/10/10.xml')
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/ivre/tools/scan2db.py", line 122, in main
merge=args.merge, masscan_probes=args.masscan_probes,
File "/usr/local/lib/python2.7/dist-packages/ivre/db/__init__.py",... | AttributeError |
def run(self):
self._dirs = self.get_dirs()
for dirname in self._dirs:
if os.path.isdir(dirname):
self._watcher.add_watch(dirname, mask=self.event_mask)
for event in self._watcher.event_gen():
if event is None:
continue
filename = event[3]
self._ca... | def run(self):
self._dirs = self.get_dirs()
for dirname in self._dirs:
self._watcher.add_watch(dirname, mask=self.event_mask)
for event in self._watcher.event_gen():
if event is None:
continue
filename = event[3]
self._callback(filename)
| https://github.com/benoitc/gunicorn/issues/2244 | [2020-01-21 21:01:06 +0100] [19910] [INFO] Starting gunicorn 20.0.4
[2020-01-21 21:01:06 +0100] [19910] [INFO] Listening at: http://127.0.0.1:8000 (19910)
[2020-01-21 21:01:06 +0100] [19910] [INFO] Using worker: sync
[2020-01-21 21:01:06 +0100] [19913] [INFO] Booting worker with pid: 19913
[2020-01-21 21:01:10 +0100] [... | SyntaxError |
def init_process(self):
"""\
If you override this method in a subclass, the last statement
in the function should be to call this method with
super().init_process() so that the ``run()`` loop is initiated.
"""
# set environment' variables
if self.cfg.env:
for k, v in... | def init_process(self):
"""\
If you override this method in a subclass, the last statement
in the function should be to call this method with
super().init_process() so that the ``run()`` loop is initiated.
"""
# set environment' variables
if self.cfg.env:
for k, v in... | https://github.com/benoitc/gunicorn/issues/2244 | [2020-01-21 21:01:06 +0100] [19910] [INFO] Starting gunicorn 20.0.4
[2020-01-21 21:01:06 +0100] [19910] [INFO] Listening at: http://127.0.0.1:8000 (19910)
[2020-01-21 21:01:06 +0100] [19910] [INFO] Using worker: sync
[2020-01-21 21:01:06 +0100] [19913] [INFO] Booting worker with pid: 19913
[2020-01-21 21:01:10 +0100] [... | SyntaxError |
def fromfd(fd, keep_fd=True):
"""Create a socket from a file descriptor
socket domain (family), type and protocol are auto-detected. By default
the socket uses a dup()ed fd. The original fd can be closed.
The parameter `keep_fd` influences fd duplication. Under Python 2 the
fd is still duplicated ... | def fromfd(fd, keep_fd=True):
"""Create a socket from a file descriptor
socket domain (family), type and protocol are auto-detected. By default
the socket uses a dup()ed fd. The original fd can be closed.
The parameter `keep_fd` influences fd duplication. Under Python 2 the
fd is still duplicated ... | https://github.com/benoitc/gunicorn/issues/2201 | [2019-11-25 11:33:44 +0800] [3967] [INFO] Starting gunicorn 20.0.2
[2019-11-25 11:33:44 +0800] [3967] [INFO] Listening at: http://127.0.0.1:8000 (3967)
[2019-11-25 11:33:44 +0800] [3967] [INFO] Using worker: sync
[2019-11-25 11:33:44 +0800] [3970] [INFO] Booting worker with pid: 3970
[2019-11-25 11:33:51 +0800] [3967] ... | OSError |
def _eventlet_sendfile(fdout, fdin, offset, nbytes, _os_sendfile=os.sendfile):
while True:
try:
return _os_sendfile(fdout, fdin, offset, nbytes)
except OSError as e:
if e.args[0] == errno.EAGAIN:
trampoline(fdout, write=True)
else:
... | def _eventlet_sendfile(fdout, fdin, offset, nbytes):
while True:
try:
return os.sendfile(fdout, fdin, offset, nbytes)
except OSError as e:
if e.args[0] == errno.EAGAIN:
trampoline(fdout, write=True)
else:
raise
| https://github.com/benoitc/gunicorn/issues/1925 | Traceback (most recent call last):
File "/usr/local/share/virtualenv/pywb/lib/python3.6/site-packages/gunicorn/workers/base_async.py", line 111, in handle_request
resp.write_file(respiter)
File "/usr/local/share/virtualenv/pywb/lib/python3.6/site-packages/gunicorn/http/wsgi.py", line 392, in write_file
if not self.send... | RecursionError |
def _gevent_sendfile(fdout, fdin, offset, nbytes, _os_sendfile=os.sendfile):
while True:
try:
return _os_sendfile(fdout, fdin, offset, nbytes)
except OSError as e:
if e.args[0] == errno.EAGAIN:
socket.wait_write(fdout)
else:
raise
| def _gevent_sendfile(fdout, fdin, offset, nbytes):
while True:
try:
return os.sendfile(fdout, fdin, offset, nbytes)
except OSError as e:
if e.args[0] == errno.EAGAIN:
socket.wait_write(fdout)
else:
raise
| https://github.com/benoitc/gunicorn/issues/1925 | Traceback (most recent call last):
File "/usr/local/share/virtualenv/pywb/lib/python3.6/site-packages/gunicorn/workers/base_async.py", line 111, in handle_request
resp.write_file(respiter)
File "/usr/local/share/virtualenv/pywb/lib/python3.6/site-packages/gunicorn/http/wsgi.py", line 392, in write_file
if not self.send... | RecursionError |
def _get_user(self, environ):
user = None
http_auth = environ.get("HTTP_AUTHORIZATION")
if http_auth and http_auth.startswith("Basic"):
auth = http_auth.split(" ", 1)
if len(auth) == 2:
try:
# b64decode doesn't accept unicode in Python < 3.3
# so w... | def _get_user(self, environ):
user = None
http_auth = environ.get("HTTP_AUTHORIZATION")
if http_auth and http_auth.startswith("Basic"):
auth = http_auth.split(" ", 1)
if len(auth) == 2:
try:
# b64decode doesn't accept unicode in Python < 3.3
# so w... | https://github.com/benoitc/gunicorn/issues/1683 | [2018-01-15 18:23:06 +0000] [15] [ERROR] Error handling request
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/glogging.py", line 269, in
'u': self._get_user(environ) or '-',
File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/glogging.py", line 446, in
auth... | UnicodeDecodeError |
def validate(self):
"""Validate pidfile and make it stale if needed"""
if not self.fname:
return
try:
with open(self.fname, "r") as f:
try:
wpid = int(f.read())
except ValueError:
return
try:
os.kill(wpid, 0... | def validate(self):
"""Validate pidfile and make it stale if needed"""
if not self.fname:
return
try:
with open(self.fname, "r") as f:
try:
wpid = int(f.read())
except ValueError:
return
try:
os.kill(wpid, 0... | https://github.com/benoitc/gunicorn/issues/1091 | Traceback (most recent call last):
File "/opt/python2.7/bin/gunicorn", line 11, in <module>
sys.exit(run())
File "/opt/python2.7/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File "/opt/python2.7/lib/python2.7/site-packages/gunicorn/app/ba... | OSError |
def start(self):
"""\
Initialize the arbiter. Start listening and set pidfile if needed.
"""
self.log.info("Starting gunicorn %s", __version__)
if "GUNICORN_PID" in os.environ:
self.master_pid = int(os.environ.get("GUNICORN_PID"))
self.proc_name = self.proc_name + ".2"
... | def start(self):
"""\
Initialize the arbiter. Start listening and set pidfile if needed.
"""
self.log.info("Starting gunicorn %s", __version__)
if "GUNICORN_PID" in os.environ:
self.master_pid = int(os.environ.get("GUNICORN_PID"))
self.proc_name = self.proc_name + ".2"
... | https://github.com/benoitc/gunicorn/issues/1423 | Traceback (most recent call last):
File "/home/berker/projects/gunicorn/gunicorn/arbiter.py", line 574, in spawn_worker
worker.init_process()
File "/home/berker/projects/gunicorn/gunicorn/workers/base.py", line 140, in init_process
self.run()
File "/home/berker/projects/gunicorn/gunicorn/workers/sync.py", line 124, in ... | IndexError |
def handle(self, listener, client, addr):
req = None
try:
parser = http.RequestParser(self.cfg, client)
try:
listener_name = listener.getsockname()
if not self.cfg.keepalive:
req = six.next(parser)
self.handle_request(listener_name, req, cl... | def handle(self, listener, client, addr):
req = None
try:
parser = http.RequestParser(self.cfg, client)
try:
listener_name = listener.getsockname()
if not self.cfg.keepalive:
req = six.next(parser)
self.handle_request(listener_name, req, cl... | https://github.com/benoitc/gunicorn/issues/939 | [2014-11-17 04:18:49 -0500] [13520] [ERROR] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.4/site-packages/gunicorn/workers/async.py", line 108, in handle_request
resp.write(item)
File "/usr/local/lib/python3.4/site-packages/gunicorn/http/wsgi.py", line 344, in write
util.write(s... | BrokenPipeError |
def handle_request(self, listener_name, req, sock, addr):
request_start = datetime.now()
environ = {}
resp = None
try:
self.cfg.pre_request(self, req)
resp, environ = wsgi.create(req, sock, addr, listener_name, self.cfg)
environ["wsgi.multithread"] = True
self.nr += 1
... | def handle_request(self, listener_name, req, sock, addr):
request_start = datetime.now()
environ = {}
resp = None
try:
self.cfg.pre_request(self, req)
resp, environ = wsgi.create(req, sock, addr, listener_name, self.cfg)
environ["wsgi.multithread"] = True
self.nr += 1
... | https://github.com/benoitc/gunicorn/issues/939 | [2014-11-17 04:18:49 -0500] [13520] [ERROR] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.4/site-packages/gunicorn/workers/async.py", line 108, in handle_request
resp.write(item)
File "/usr/local/lib/python3.4/site-packages/gunicorn/http/wsgi.py", line 344, in write
util.write(s... | BrokenPipeError |
def accept(self, listener):
try:
client, addr = listener.accept()
# initialize the connection object
conn = TConn(self.cfg, listener, client, addr)
self.nr_conns += 1
# enqueue the job
self.enqueue_req(conn)
except EnvironmentError as e:
if e.errno not in ... | def accept(self, listener):
try:
client, addr = listener.accept()
# initialize the connection object
conn = TConn(self.cfg, listener, client, addr)
self.nr_conns += 1
# enqueue the job
self.enqueue_req(conn)
except socket.error as e:
if e.args[0] not in (e... | https://github.com/benoitc/gunicorn/issues/939 | [2014-11-17 04:18:49 -0500] [13520] [ERROR] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.4/site-packages/gunicorn/workers/async.py", line 108, in handle_request
resp.write(item)
File "/usr/local/lib/python3.4/site-packages/gunicorn/http/wsgi.py", line 344, in write
util.write(s... | BrokenPipeError |
def murder_keepalived(self):
now = time.time()
while True:
with self._lock:
try:
# remove the connection from the queue
conn = self._keep.popleft()
except IndexError:
break
delta = conn.timeout - now
if delta > 0:
... | def murder_keepalived(self):
now = time.time()
while True:
with self._lock:
try:
# remove the connection from the queue
conn = self._keep.popleft()
except IndexError:
break
delta = conn.timeout - now
if delta > 0:
... | https://github.com/benoitc/gunicorn/issues/939 | [2014-11-17 04:18:49 -0500] [13520] [ERROR] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.4/site-packages/gunicorn/workers/async.py", line 108, in handle_request
resp.write(item)
File "/usr/local/lib/python3.4/site-packages/gunicorn/http/wsgi.py", line 344, in write
util.write(s... | BrokenPipeError |
def handle(self, conn):
keepalive = False
req = None
try:
req = six.next(conn.parser)
if not req:
return (False, conn)
# handle the request
keepalive = self.handle_request(req, conn)
if keepalive:
return (keepalive, conn)
except http.error... | def handle(self, conn):
keepalive = False
req = None
try:
req = six.next(conn.parser)
if not req:
return (False, conn)
# handle the request
keepalive = self.handle_request(req, conn)
if keepalive:
return (keepalive, conn)
except http.error... | https://github.com/benoitc/gunicorn/issues/939 | [2014-11-17 04:18:49 -0500] [13520] [ERROR] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.4/site-packages/gunicorn/workers/async.py", line 108, in handle_request
resp.write(item)
File "/usr/local/lib/python3.4/site-packages/gunicorn/http/wsgi.py", line 344, in write
util.write(s... | BrokenPipeError |
def handle_request(self, req, conn):
environ = {}
resp = None
try:
self.cfg.pre_request(self, req)
request_start = datetime.now()
resp, environ = wsgi.create(
req, conn.sock, conn.addr, conn.listener.getsockname(), self.cfg
)
environ["wsgi.multithread"] = ... | def handle_request(self, req, conn):
environ = {}
resp = None
try:
self.cfg.pre_request(self, req)
request_start = datetime.now()
resp, environ = wsgi.create(
req, conn.sock, conn.addr, conn.listener.getsockname(), self.cfg
)
environ["wsgi.multithread"] = ... | https://github.com/benoitc/gunicorn/issues/939 | [2014-11-17 04:18:49 -0500] [13520] [ERROR] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.4/site-packages/gunicorn/workers/async.py", line 108, in handle_request
resp.write(item)
File "/usr/local/lib/python3.4/site-packages/gunicorn/http/wsgi.py", line 344, in write
util.write(s... | BrokenPipeError |
def run_for_one(self, timeout):
listener = self.sockets[0]
while self.alive:
self.notify()
# Accept a connection. If we get an error telling us
# that no connection is waiting we fall down to the
# select which is where we'll wait for a bit for new
# workers to come give... | def run_for_one(self, timeout):
listener = self.sockets[0]
while self.alive:
self.notify()
# Accept a connection. If we get an error telling us
# that no connection is waiting we fall down to the
# select which is where we'll wait for a bit for new
# workers to come give... | https://github.com/benoitc/gunicorn/issues/939 | [2014-11-17 04:18:49 -0500] [13520] [ERROR] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.4/site-packages/gunicorn/workers/async.py", line 108, in handle_request
resp.write(item)
File "/usr/local/lib/python3.4/site-packages/gunicorn/http/wsgi.py", line 344, in write
util.write(s... | BrokenPipeError |
def run_for_multiple(self, timeout):
while self.alive:
self.notify()
try:
ready = self.wait(timeout)
except StopWaiting:
return
if ready is not None:
for listener in ready:
try:
self.accept(listener)
... | def run_for_multiple(self, timeout):
while self.alive:
self.notify()
try:
ready = self.wait(timeout)
except StopWaiting:
return
if ready is not None:
for listener in ready:
try:
self.accept(listener)
... | https://github.com/benoitc/gunicorn/issues/939 | [2014-11-17 04:18:49 -0500] [13520] [ERROR] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.4/site-packages/gunicorn/workers/async.py", line 108, in handle_request
resp.write(item)
File "/usr/local/lib/python3.4/site-packages/gunicorn/http/wsgi.py", line 344, in write
util.write(s... | BrokenPipeError |
def handle(self, listener, client, addr):
req = None
try:
if self.cfg.is_ssl:
client = ssl.wrap_socket(client, server_side=True, **self.cfg.ssl_options)
parser = http.RequestParser(self.cfg, client)
req = six.next(parser)
self.handle_request(listener, req, client, ad... | def handle(self, listener, client, addr):
req = None
try:
if self.cfg.is_ssl:
client = ssl.wrap_socket(client, server_side=True, **self.cfg.ssl_options)
parser = http.RequestParser(self.cfg, client)
req = six.next(parser)
self.handle_request(listener, req, client, ad... | https://github.com/benoitc/gunicorn/issues/939 | [2014-11-17 04:18:49 -0500] [13520] [ERROR] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.4/site-packages/gunicorn/workers/async.py", line 108, in handle_request
resp.write(item)
File "/usr/local/lib/python3.4/site-packages/gunicorn/http/wsgi.py", line 344, in write
util.write(s... | BrokenPipeError |
def handle_request(self, listener, req, client, addr):
environ = {}
resp = None
try:
self.cfg.pre_request(self, req)
request_start = datetime.now()
resp, environ = wsgi.create(req, client, addr, listener.getsockname(), self.cfg)
# Force the connection closed until someone sho... | def handle_request(self, listener, req, client, addr):
environ = {}
resp = None
try:
self.cfg.pre_request(self, req)
request_start = datetime.now()
resp, environ = wsgi.create(req, client, addr, listener.getsockname(), self.cfg)
# Force the connection closed until someone sho... | https://github.com/benoitc/gunicorn/issues/939 | [2014-11-17 04:18:49 -0500] [13520] [ERROR] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.4/site-packages/gunicorn/workers/async.py", line 108, in handle_request
resp.write(item)
File "/usr/local/lib/python3.4/site-packages/gunicorn/http/wsgi.py", line 344, in write
util.write(s... | BrokenPipeError |
def _set_handler(self, log, output, fmt):
# remove previous gunicorn log handler
h = self._get_gunicorn_handler(log)
if h:
log.handlers.remove(h)
if output is not None:
if output == "-":
h = logging.StreamHandler()
else:
util.check_is_writeable(output)
... | def _set_handler(self, log, output, fmt):
# remove previous gunicorn log handler
h = self._get_gunicorn_handler(log)
if h:
log.handlers.remove(h)
if output is not None:
if output == "-":
h = logging.StreamHandler()
else:
util.check_is_writeable(output)
... | https://github.com/benoitc/gunicorn/issues/1157 | Traceback (most recent call last):
File "/env/bin/gunicorn", line 11, in <module>
sys.exit(run())
File "/env/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File "/env/lib/python2.7/site-packages/gunicorn/app/base.py", line 192, in run
super... | OSError |
def _get_user(self, environ):
user = None
http_auth = environ.get("HTTP_AUTHORIZATION")
if http_auth and http_auth.startswith("Basic"):
auth = http_auth.split(" ", 1)
if len(auth) == 2:
try:
# b64decode doesn't accept unicode in Python < 3.3
# so w... | def _get_user(self, environ):
user = None
http_auth = environ.get("HTTP_AUTHORIZATION")
if http_auth:
auth = http_auth.split(" ", 1)
if len(auth) == 2:
try:
# b64decode doesn't accept unicode in Python < 3.3
# so we need to convert it to a byte str... | https://github.com/benoitc/gunicorn/issues/1148 | Traceback (most recent call last):
File "/usr/src/deps/gunicorn/gunicorn/workers/async.py", line 116, in handle_request
self.log.access(resp, req, environ, request_time)
File "/usr/src/deps/gunicorn/gunicorn/glogging.py", line 287, in access
request_time))
File "/usr/src/deps/gunicorn/gunicorn/glogging.py", line 243, i... | UnicodeDecodeError |
def parse_request_line(self, line):
bits = line.split(None, 2)
if len(bits) != 3:
raise InvalidRequestLine(line)
# Method
if not METH_RE.match(bits[0]):
raise InvalidRequestMethod(bits[0])
self.method = bits[0].upper()
# URI
# When the path starts with //, urlsplit consider... | def parse_request_line(self, line):
bits = line.split(None, 2)
if len(bits) != 3:
raise InvalidRequestLine(line)
# Method
if not METH_RE.match(bits[0]):
raise InvalidRequestMethod(bits[0])
self.method = bits[0].upper()
# URI
# When the path starts with //, urlsplit consider... | https://github.com/benoitc/gunicorn/issues/1023 | (tempenv-027621611529f) ~/.v/tempenv-701523535780 $ gunicorn w:f
[2015-05-09 11:53:50 -0400] [75550] [INFO] Starting gunicorn 19.3.0
[2015-05-09 11:53:50 -0400] [75550] [INFO] Listening at: http://127.0.0.1:8000 (75550)
[2015-05-09 11:53:50 -0400] [75550] [INFO] Using worker: sync
[2015-05-09 11:53:50 -0400] [75567] [I... | ValueError |
def handle(self, listener, client, addr):
req = None
try:
parser = http.RequestParser(self.cfg, client)
try:
listener_name = listener.getsockname()
if not self.cfg.keepalive:
req = six.next(parser)
self.handle_request(listener_name, req, cl... | def handle(self, listener, client, addr):
req = None
try:
parser = http.RequestParser(self.cfg, client)
try:
listener_name = listener.getsockname()
if not self.cfg.keepalive:
req = six.next(parser)
self.handle_request(listener_name, req, cl... | https://github.com/benoitc/gunicorn/issues/923 | [2014-10-27 20:36:55 +0000] [22663] [ERROR] Error handling request
Traceback (most recent call last):
File "/mnt/runscope/.virtualenvs/embedcurl/src/gunicorn/gunicorn/workers/async.py", line 41, in handle
proxy_protocol_info = req.proxy_protocol_info
AttributeError: 'NoneType' object has no attribute 'proxy_protocol_in... | AttributeError |
def murder_keepalived(self):
now = time.time()
while True:
try:
# remove the connection from the queue
conn = self._keep.popleft()
except IndexError:
break
delta = conn.timeout - now
if delta > 0:
# add the connection back to the q... | def murder_keepalived(self):
now = time.time()
while True:
try:
conn = self._keep.popleft()
except IndexError:
break
delta = conn.timeout - now
if delta > 0:
self._keep.appendleft(conn)
break
else:
# remove the ... | https://github.com/benoitc/gunicorn/issues/816 | (wsgiapps)sontek@aladdin:~/src/wsgiapps/pyramid_hello$ gunicorn --paste development.ini --log-file=-
2014-07-12 00:10:42 [4752] [INFO] Starting gunicorn 19.0.0
2014-07-12 00:10:42 [4752] [INFO] Listening at: http://0.0.0.0:8000 (4752)
2014-07-12 00:10:42 [4752] [INFO] Using worker: threads
2014-07-12 00:10:42 [4803] [... | IndexError |
def app(environ, start_response):
"""Framework Engine"""
os.environ.setdefault("REQUEST_METHOD", environ["REQUEST_METHOD"])
os.environ.setdefault("URI_PATH", environ["PATH_INFO"])
router = Route(environ)
if router.is_post():
# Set POST parameters given into the query string to centralize p... | def app(environ, start_response):
"""Framework Engine"""
os.environ.setdefault("REQUEST_METHOD", environ["REQUEST_METHOD"])
os.environ.setdefault("URI_PATH", environ["PATH_INFO"])
router = Route(environ)
if router.is_post():
# Set POST parameters given into the query string to centralize p... | https://github.com/MasoniteFramework/masonite/issues/63 | ERROR:waitress:Exception when serving /logout
Traceback (most recent call last):
File "/Users/mancuso/Programming/cleanblog/venv/lib/python3.6/site-packages/waitress/channel.py", line 338, in service
task.service()
File "/Users/mancuso/Programming/cleanblog/venv/lib/python3.6/site-packages/waitress/task.py", line 169, ... | TypeError |
def open(cls, grammar_filename, rel_to=None, **options):
"""Create an instance of Lark with the grammar given by its filename
If rel_to is provided, the function will find the grammar filename in relation to it.
Example:
>>> Lark.open("grammar_file.lark", rel_to=__file__, parser="lalr")
L... | def open(cls, grammar_filename, rel_to=None, **options):
"""Create an instance of Lark with the grammar given by its filename
If rel_to is provided, the function will find the grammar filename in relation to it.
Example:
>>> Lark.open("grammar_file.lark", rel_to=__file__, parser="lalr")
L... | https://github.com/lark-parser/lark/issues/179 | Traceback (most recent call last):
File "d:\lark-parser\lark\lexer.py", line 221, in __init__
lexer = lexer_by_tokens[key]
KeyError: frozenset({Token(TERMINAL, '__ANON_0'), 'grammar'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "d:\lark-parser\lark\lexe... | KeyError |
def parse(self, stream, start_symbol=None):
# Define parser functions
start_symbol = start_symbol or self.start_symbol
delayed_matches = defaultdict(list)
text_line = 1
text_column = 0
def predict(nonterm, column):
assert not isinstance(nonterm, Terminal), nonterm
return [Item(... | def parse(self, stream, start_symbol=None):
# Define parser functions
start_symbol = start_symbol or self.start_symbol
delayed_matches = defaultdict(list)
text_line = 1
text_column = 0
def predict(nonterm, column):
assert not isinstance(nonterm, Terminal), nonterm
return [Item(... | https://github.com/lark-parser/lark/issues/24 | Traceback (most recent call last):
File "lark_earley_bug.py", line 18, in <module>
tree = parser.parse("int 1 ! This is a comment\n")
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lark/lark.py", line 193, in parse
return self.parser.parse(text)
File "/Library/Frameworks/Python.fram... | lark.common.ParseError |
def scan(i, token, column):
to_scan = column.to_scan.get_news()
for x in self.ignore:
m = x.match(stream, i)
if m:
# TODO add partial matches for ignore too?
delayed_matches[m.end()] += to_scan
for item in to_scan:
m = item.expect.match(stream, i)
if... | def scan(i, token, column):
for x in self.ignore:
m = x.match(stream, i)
if m:
return column
to_scan = column.to_scan.get_news()
for item in to_scan:
m = item.expect.match(stream, i)
if m:
t = Token(item.expect.name, m.group(0), i, text_line, text_co... | https://github.com/lark-parser/lark/issues/24 | Traceback (most recent call last):
File "lark_earley_bug.py", line 18, in <module>
tree = parser.parse("int 1 ! This is a comment\n")
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lark/lark.py", line 193, in parse
return self.parser.parse(text)
File "/Library/Frameworks/Python.fram... | lark.common.ParseError |
def _identify_local_rank(self):
if "SLURM_JOBID" in os.environ:
os.environ["LOCAL_RANK"] = os.environ["SLURM_LOCALID"]
if "LOCAL_RANK" in os.environ:
self._local_rank = int(os.environ["LOCAL_RANK"])
elif self._ext_local_rank is not None:
self._local_rank = self._ext_local_rank
e... | def _identify_local_rank(self):
if "SLURM_JOBID" in os.environ:
os.environ["LOCAL_RANK"] = os.environ["SLURM_LOCALID"]
if "LOCAL_RANK" in os.environ:
self._local_rank = int(os.environ["LOCAL_RANK"])
elif self._ext_local_rank is not None:
self._local_rank = self._ext_local_rank
e... | https://github.com/pytorch/ignite/issues/1110 | import ignite
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Foo\anaconda3\envs\ignite\lib\site-packages\ignite\__init__.py", line 2, in <module>
import ignite.distributed
File "C:\Users\Foo\anaconda3\envs\ignite\lib\site-packages\ignite\distributed\__init__.py", line 1, in <modul... | AttributeError |
def create_from_context() -> Optional["_XlaDistModel"]:
return _XlaDistModel()
| def create_from_context() -> Optional["_XlaDistModel"]:
if not has_xla_support:
return None
return _XlaDistModel()
| https://github.com/pytorch/ignite/issues/1110 | import ignite
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Foo\anaconda3\envs\ignite\lib\site-packages\ignite\__init__.py", line 2, in <module>
import ignite.distributed
File "C:\Users\Foo\anaconda3\envs\ignite\lib\site-packages\ignite\distributed\__init__.py", line 1, in <modul... | AttributeError |
def create_from_backend(backend: str = "xla-tpu", **kwargs) -> "_XlaDistModel":
return _XlaDistModel(backend=backend, **kwargs)
| def create_from_backend(backend: str = "xla-tpu", **kwargs) -> "_XlaDistModel":
if not has_xla_support:
raise RuntimeError("Torch xla package is not installed.")
return _XlaDistModel(backend=backend, **kwargs)
| https://github.com/pytorch/ignite/issues/1110 | import ignite
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Foo\anaconda3\envs\ignite\lib\site-packages\ignite\__init__.py", line 2, in <module>
import ignite.distributed
File "C:\Users\Foo\anaconda3\envs\ignite\lib\site-packages\ignite\distributed\__init__.py", line 1, in <modul... | AttributeError |
def spawn(
fn: Callable,
args: Tuple,
kwargs_dict: Optional[Mapping] = None,
num_procs_per_node: int = 1,
num_nodes: int = 1,
node_rank: int = 0,
backend: str = "xla-tpu",
**kwargs,
):
import os
if "COLAB_TPU_ADDR" in os.environ:
kwargs["start_method"] = "fork"
xmp.... | def spawn(
fn: Callable,
args: Tuple,
kwargs_dict: Optional[Mapping] = None,
num_procs_per_node: int = 1,
num_nodes: int = 1,
node_rank: int = 0,
backend: str = "xla-tpu",
**kwargs,
):
if not has_xla_support:
raise RuntimeError("Torch xla package is not installed.")
impo... | https://github.com/pytorch/ignite/issues/1110 | import ignite
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Foo\anaconda3\envs\ignite\lib\site-packages\ignite\__init__.py", line 2, in <module>
import ignite.distributed
File "C:\Users\Foo\anaconda3\envs\ignite\lib\site-packages\ignite\distributed\__init__.py", line 1, in <modul... | AttributeError |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.