jamesqo / gun-violence-data

A comprehensive, accessible database that contains records of over 260k US gun violence incidents from January 2013 to March 2018.
6 stars 2 forks source link

TypeError: Constructor parameter should be str in stage2.py #8

Open neiljelmert opened 5 years ago

neiljelmert commented 5 years ago

After running stage2.py, I get this:

ERROR! Extraction failed for the following url: None Traceback (most recent call last): File "/Users/neiljelmert/Desktop/Projects/GV/gun-violence-data/scripts/stage2_session.py", line 96, in get_fields_from_incident_url return await self._get_fields_from_incident_url(row) File "/Users/neiljelmert/Desktop/Projects/GV/gun-violence-data/scripts/stage2_session.py", line 78, in _get_fields_from_incident_url resp = await self._get(incident_url) File "/Users/neiljelmert/Desktop/Projects/GV/gun-violence-data/scripts/stage2_session.py", line 60, in _get resp = await self._sess.get(url) File "/Users/neiljelmert/anaconda3/lib/python3.6/site-packages/aiohttp/client.py", line 277, in _request url = URL(url) File "/Users/neiljelmert/anaconda3/lib/python3.6/site-packages/yarl/__init__.py", line 157, in __new__ raise TypeError("Constructor parameter should be str") TypeError: Constructor parameter should be str

Not too familiar with yarl or aiohttp, so perhaps there has been a change since 7 months ago?

TomSelleck commented 4 years ago

One of the congressional districts has an 'A' in it. Need to change the apply=int to apply=None