Skip to content
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

AttributeError: 'NoneType' object has no attribute 'span' #20

Open
loretoparisi opened this issue Oct 21, 2016 · 2 comments
Open

AttributeError: 'NoneType' object has no attribute 'span' #20

loretoparisi opened this issue Oct 21, 2016 · 2 comments

Comments

@loretoparisi
Copy link

I get this error

$ python main.py
()
*** WIKIPEDIA DATA ANALYSIS TOOLKIT ***
()
----------------------------------------------------------
Executing ETL:RevHistory on lang: scowiki date: 20151201
ETL lines = 1 page_fan = 1 rev_fan = 1
('Download files =', True)
Start time is 2016-10-21 10:52:32 CEST
----------------------------------------------------------
()
Downloading new dump files from http://dumps.wikimedia.your.org/, for language scowiki
Target URL is: http://dumps.wikimedia.your.org/scowiki/20151201
Traceback (most recent call last):
  File "main.py", line 322, in <module>
    debug=args.debug)
  File "/usr/local/lib/python2.7/dist-packages/WikiDAT-0.1-py2.7.egg/wikidat/tasks/tasks.py", line 129, in execute
    self.paths, self.date = self.down.download(self.date)
  File "/usr/local/lib/python2.7/dist-packages/WikiDAT-0.1-py2.7.egg/wikidat/tasks/download.py", line 88, in download
    status_dumps = soup_dumps.find('p', class_='status').spa

on

$ python --version
Python 2.7.12
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.1 LTS
Release:    16.04
Codename:   xenial
@loretoparisi
Copy link
Author

[UPDATE]
Ok it seems it was due to Python2.7.12 so I did

$ virtualenv -p python3 env
$ python --version
$ python setup.py build
$ python setup.py install

Now I get

/WikiDAT/wikidat$ python main.py 
Traceback (most recent call last):
  File "main.py", line 22, in <module>
    from wikidat.tasks import tasks
ImportError: No module named 'wikidat

@glimmerphoenix
Copy link
Owner

Hi Loreto,

Please, make sure that the wikidat module is installed correctly inside your virtual environment:
http://stackoverflow.com/questions/19048732/python-setup-py-develop-vs-install/19048754#19048754

From the error message above, it seems that python cannot find the path to load the module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants