-
Notifications
You must be signed in to change notification settings - Fork 413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nonetype Error on Update Players #326
Comments
You mention that Is this an issue you continue to see when attempting to re-run |
@ochawkeye that's correct. This is when specifically invoking nflgame-update-players |
@ochawkeye actually, it looks like nfldb-update is now failing with the same error. |
I'm also having the same problem |
Hey @ochawkeye any idea why changing the PARSER object in line 129 of nflgame/update_players.py makes things work? Seems lxml parsing throws out all the HTML from the From this
|
Certainly helps explain why I'm not seeing the issue. From
I don't have |
I just wanted to add that I am also having this same problem. I tried making the same modification to update_players.py as JessePresnell did above but still appear to have the same problem with soup as before only my traceback is slightly different: .
|
That really doesn't look like the same error... I suspect it was not anticipated that |
Hi @ochawkeye , yes I can definitely access the url. |
Maybe I'm barking up the wrong tree on this, but I'm still leaning toward you not being able to get to the urls. Can you do this for me? Open up a python interpreter in a terminal window / command prompt.
|
My output:
|
Is the error you pasted above something that happens every time you run it? Can you just try to run |
Ran into #316 earlier and also needed to update my init.py file to add the LA Chargers line per BurntSushi/nfldb#252 and now I'm getting the following error when trying to run
>>> python nflgame-update-players
Loading games for POST 2016 week 5
Downloading team rosters...
1/33 complete. (3.03%)Traceback (most recent call last):
File "nflgame-update-players", line 4, in
nflgame.update_players.run()
File "C:\Python27\lib\site-packages\nflgame\update_players.py", line 415, in run
tbodys = soup.find(id='result').find_all('tbody')
AttributeError: 'NoneType' object has no attribute 'find_all'
So far I've:
Loading games for POST 2016 week 5
Downloading team rosters...
1/33 complete. (3.03%)Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "C:\Python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\lib\site-packages\nflgame\update_players.py", line 501, in
run()
File "C:\Python27\lib\site-packages\nflgame\update_players.py", line 415, in run
tbodys = soup.find(id='result').find_all('tbody')
AttributeError: 'NoneType' object has no attribute 'find_all'
Exception in thread Thread-3 (most likely raised during interpreter shutdown):
C:\Python27\python.exe -m nflgame.update_players --no-block
failed (exit status 1)done.
Locking player table...
Updating 7827 players... done.
Locking write access to tables... done.
Updating season phase, year and week... done.
Bulk inserting data for 3 games...
Sending batch of data to database.
done.
Updating schedule JSON database...
Last updated: 2017-09-13 04:39:00.186000
done.
Updating schedule for (Postseason, 2016, 5)
done.
Closing database connection... done.
FINISHED NFLDB UPDATE AT 2017-09-13 18:43:31.060000
Any suggestions on what may be the culprit?
The text was updated successfully, but these errors were encountered: