Comments (18)
Are you working from within your virtualenv? I'm not sure how virtualenv works on windows, but you should have run an activate step?
When you import scrapelib what does scrapelib.version print as?
from scrapelib.
Ah... i hadn't yesterday. Since then I've
- uninstalled scrapelib globally and from the project virtualenv
- reinstalled scrapelib in the virtualenv
At /env/Scripts I can see:
- scrapeshell
- scrapeshell.exe.manifest
- scrapeshell-script
When I check which python I get:
$ which python
/cygdrive/c/Users/natalie/Documents/Encore-in-Google/env/Scripts/python
(env)
But when I check which scrapelib I get:
$ which scrapelib
which: no scrapelib in (/cygdrive/c/Users/natalie/Documents/Encore-in-Google/env/Scripts:/usr/local/bin:/usr/bin:/cygdrive/c/Python34:/cygdrive/c/Python34/Scripts:/cygdrive/c/Program Files/Broadcom/Broadcom 802.11 Network Adapter/Driver:/cygdrive/c/Program Files (x86)/AMD APP/bin/x86_64:/cygdrive/c/Program Files (x86)/AMD APP/bin/x86:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static:/cygdrive/c/Program Files/Lenovo/Bluetooth Software:/cygdrive/c/Program Files/Lenovo/Bluetooth Software/syswow64:/cygdrive/c/Program Files (x86)/nodejs:/cygdrive/c/Users/natalie/AppData/Roaming/npm)
(env)
In IDLE when I run:
import scrapelib
print (scrapelib.version)
I get:
Traceback (most recent call last):
File "C:\Users\natalie\Documents\Encore-in-Google\scrapelib.py", line 1, in
import scrapelib
File "C:\Users\natalie\Documents\Encore-in-Google\scrapelib.py", line 3, in
print (scrapelib.version)
AttributeError: 'module' object has no attribute 'version'
I'm not why I can see some scrapelib (scrapeshell) files in env/Scripts, but cannot use scrapelib.
Thanks,
from scrapelib.
can you try printing scrapelib.__version__
with the double underscores
On Wed, Jun 25, 2014 at 3:41 PM, pollecuttn [email protected]
wrote:
Ah... i hadn't yesterday. Since then I've
- uninstalled scrapelib globally and from the project virtualenv
- reinstalled scrapelib in the virtualenv
At /env/Scripts I can see:
- scrapeshell
- scrapeshell.exe.manifest
- scrapeshell-script
When I check which python I get:
$ which python
/cygdrive/c/Users/natalie/Documents/Encore-in-Google/env/Scripts/python
(env)But when I check which scrapelib I get:
$ which scrapelib
which: no scrapelib in
(/cygdrive/c/Users/natalie/Documents/Encore-in-Google/env/Scripts:/usr/local/bin:/usr/bin:/cygdrive/c/Python34:/cygdrive/c/Python34/Scripts:/cygdrive/c/Program
Files/Broadcom/Broadcom 802.11 Network Adapter/Driver:/cygdrive/c/Program
Files (x86)/AMD APP/bin/x86_64:/cygdrive/c/Program Files (x86)/AMD
APP/bin/x86:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program
Files (x86)/ATI Technologies/ATI.ACE/Core-Static:/cygdrive/c/Program
Files/Lenovo/Bluetooth Software:/cygdrive/c/Program Files/Lenovo/Bluetooth
Software/syswow64:/cygdrive/c/Program Files
(x86)/nodejs:/cygdrive/c/Users/natalie/AppData/Roaming/npm)
(env)In IDLE when I run:
import scrapelib
print (scrapelib.version)I get:
Traceback (most recent call last):
File "C:\Users\natalie\Documents\Encore-in-Google\scrapelib.py", line 1,
in
import scrapelib
File "C:\Users\natalie\Documents\Encore-in-Google\scrapelib.py", line 3,
in
print (scrapelib.version)
AttributeError: 'module' object has no attribute 'version'I'm not why I can see some scrapelib (scrapeshell) files in env/Scripts,
but cannot use scrapelib.Thanks,
—
Reply to this email directly or view it on GitHub
#19 (comment)
.
from scrapelib.
Traceback (most recent call last):
File "C:\Users\natalie\Documents\Encore-in-Google\scrapelib.py", line 1, in
import scrapelib
File "C:\Users\natalie\Documents\Encore-in-Google\scrapelib.py", line 3, in
print (scrapelib.version)
AttributeError: 'module' object has no attribute 'version'
from scrapelib.
Traceback (most recent call last):
File "C:\Users\natalie\Documents\Encore-in-Google\scrapelib.py", line 1, in
import scrapelib
File "C:\Users\natalie\Documents\Encore-in-Google\scrapelib.py", line 3, in
print (scrapelib.version)
AttributeError: 'module' object has no attribute 'version'
from scrapelib.
very strange- i'd recommend uninstalling & reinstalling scrapelib. are other python libraries working in your environment? is requests?
from scrapelib.
It doesn't come out in the comment formatting, but I do have the double underscores...
from scrapelib.
can you rename your file something other than scrapelib? that is likely the culprit (thanks @paultag!)
from scrapelib.
I uninstalled and reinstalled scrapelib before I commented today.
I can use requests but when I do which requests I get a similar message to the one for scrapelib, whether i have my virtualenv activated or not. I don't know how that's possible.
import requests
r = requests.get('http://google.com')
print (r.status_code)
gives:
200
from scrapelib.
Have you tried renaming your script scrapelib.py to something else, perhaps
scrapetest.py -- the issue is probably that it is trying to import itself
On Wed, Jun 25, 2014 at 6:11 PM, pollecuttn [email protected]
wrote:
I uninstalled and reinstalled scrapelib before I commented today.
I can use requests but when I do which requests I get a similar message to
the one for scrapelib, whether i have my virtualenv activated or not. I
don't know how that's possible.import requests
r = requests.get('http://google.com')
print (r.status_code)gives:
200—
Reply to this email directly or view it on GitHub
#19 (comment)
.
from scrapelib.
File renamed scraplib-test.py:
Traceback (most recent call last):
File "C:\Users\natalie\Documents\Encore-in-Google\scrapelib-test.py", line 1, in
import scrapelib
File "C:\Users\natalie\Documents\Encore-in-Google\scrapelib.py", line 3, in
print (scrapelib.version)
AttributeError: 'module' object has no attribute 'version'
from scrapelib.
You still have a scrapelib.py in that directory, try removing it.
On Wed, Jun 25, 2014 at 6:14 PM, pollecuttn [email protected]
wrote:
File renamed scraplib-test.py:
Traceback (most recent call last):
File "C:\Users\natalie\Documents\Encore-in-Google\scrapelib-test.py", line
1, in
import scrapelibFile "C:\Users\natalie\Documents\Encore-in-Google\scrapelib.py", line 3,
in
print (scrapelib.version)
AttributeError: 'module' object has no attribute 'version'—
Reply to this email directly or view it on GitHub
#19 (comment)
.
from scrapelib.
Traceback (most recent call last):
File "C:\Users\natalie\Documents\Encore-in-Google\scrapelib-test.py", line 1, in
import scrapelib
ImportError: No module named 'scrapelib'
At least it's a different message...
So is it telling me I don't have scrapelib? I just tried uninstalling and reinstalling scrapelib again, in my virtualenv, and I'm still getting the same ImportError: No module named 'scrapelib'.
I can still see these in env/Scripts:
scrapeshell
scrapeshell.exe.manifest
scrapeshell-script
(but nothing about scrapelib)
from scrapelib.
Scrapelib would not appear in env/Scripts, it is a Python module, not a
script.
Are you sure your virtualenv is activated? If you've installed it you
would be able to import it. Does "import requests" still work?
On Wed, Jun 25, 2014 at 6:22 PM, pollecuttn [email protected]
wrote:
Traceback (most recent call last):
File "C:\Users\natalie\Documents\Encore-in-Google\scrapelib-test.py", line
1, in
import scrapelib
ImportError: No module named 'scrapelib'At least it's a different message...
So is it telling me I don't have scrapelib? I just tried uninstalling
and reinstalling scrapelib again, in my virtualenv, and I'm still getting
the same ImportError: No module named 'scrapelib'.I can still see these in env/Scripts:
scrapeshell
scrapeshell.exe.manifest
scrapeshell-script
(but nothing about scrapelib)—
Reply to this email directly or view it on GitHub
#19 (comment)
.
from scrapelib.
I've been working from http://www.dabapps.com/blog/introduction-to-pip-and-virtualenv-python/ That says pip is in will be in env/bin/pip. I don't have a /bin/ dir, but pip is in env/Scripts so I was using that instead (as a best guess).
I've just had a look in other directories and there is a scrapelib in C:\Users\natalie\Documents\Encore-in-Google\env\Lib\site-packages. Does that sound good? And if so, how do I import scrapelib from there?
I can't see a /bin/ dir anywhere in this project.
from scrapelib.
import requests still works (still getting a 200 response from http://google.com/)
from scrapelib.
Sorry- I'm really not qualified to give advice on a Windows Python
environment though, not sure I'll be able to help with this as it doesn't
seem like a scrapelib issue.
I can say that scrapelib being in site-packages is a good thing, assuming
the env is activated, my guess right now is that it isn't activated (the
fact that there isn't an env/bin is concerning as that is where the python
binary should be), but I can't confirm.
On Wed, Jun 25, 2014 at 6:30 PM, pollecuttn [email protected]
wrote:
I've been working from
http://www.dabapps.com/blog/introduction-to-pip-and-virtualenv-python/
That says pip is in will be in env/bin/pip. I don't have a /bin/ dir, but
pip is in env/Scripts so I was using that instead (as a best guess).I've just had a look in other directories and there is a scrapelib in
C:\Users\natalie\Documents\Encore-in-Google\env\Lib\site-packages. Does
that sound good? And if so, how do I import scrapelib from there?I can't see a /bin/ dir anywhere in this project.
—
Reply to this email directly or view it on GitHub
#19 (comment)
.
from scrapelib.
Okay, that's fair enough. At least it looks like I've got scrapelib. Thanks a lot for all your help! I'll try to figure out the env/bin problem.
from scrapelib.
Related Issues (20)
- set attribute to indicate if response was pulled from cache or not HOT 1
- Handling of requests exceptions HOT 2
- add option to for parameters to be considered in cache key
- robotparser is wrong? HOT 2
- Scaper.urlopen should support timeout HOT 1
- should urlretrieve read/write blocks in a loop? HOT 1
- Recent changes break urlopen? HOT 5
- next version of scrapelib
- remove urlopen/RequestStr
- Example usage uses deprecated urlopen HOT 1
- release to pypi? HOT 2
- Comparison with Scrapy HOT 1
- scrapelib incorrectly caches kwargs to requests HOT 7
- Allow caching to be controlled by server's cache headers HOT 1
- Add ability to cache via redis or memcache HOT 2
- May want to consider requiring requests security extras HOT 2
- Allow for more control of status codes to not retry on HOT 2
- Time for a release, maybe? HOT 1
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scrapelib.