You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[parse(book) for book in books]
'''
Traceback (most recent call last):
File "c:/Passport_G/Rob_justpy/jptutorial/gazpacho.py", line 1, in
from gazpacho import get, Soup
File "c:\Passport_G\Rob_justpy\jptutorial\gazpacho.py", line 1, in
from gazpacho import get, Soup
ImportError: cannot import name 'get' from 'gazpacho' (c:\Passport_G\Rob_justpy\jptutorial\gazpacho.py)
Environment:
Windows 10]
from command line
(jp) C:\Passport_G\Rob_justpy\jptutorial>pip install -U gazpacho
Processing c:\users\rober\appdata\local\pip\cache\wheels\db\6b\a2\486f272d5e523b56bd19817c14ef35ec1850644dea78f9dd76\gazpacho-1.1-py3-none-any.whl
Installing collected packages: gazpacho
Successfully installed gazpacho-1.1
WARNING: You are using pip version 20.2.4; however, version 20.3.3 is available.
You should consider upgrading via the 'c:\passport_g\rob_justpy\jptutorial\jp\scripts\python.exe -m pip install --upgrade pip' command.
(jp) C:\Passport_G\Rob_justpy\jptutorial>
(jp) C:\Passport_G\Rob_justpy\jptutorial>python
Python 3.7.6 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Warning:
This Python interpreter is in a conda environment, but the environment has
not been activated. Libraries may fail to load. To activate this environment
please see https://conda.io/activation
Type "help", "copyright", "credits" or "license" for more information.
import gazpacho
Traceback (most recent call last):
File "", line 1, in
File "C:\Passport_G\Rob_justpy\jptutorial\gazpacho.py", line 1, in
from gazpacho import get, Soup
ImportError: cannot import name 'get' from 'gazpacho' (C:\Passport_G\Rob_justpy\jptutorial\gazpacho.py)
The text was updated successfully, but these errors were encountered:
from gazpacho import get, Soup
ImportError: cannot import name 'get' from 'gazpacho'
import gazpacho
Does work
from gazpacho import get, Soup
#import gazpacho #works
'''
url = 'https://scrape.world/books'
html = get(url)
soup = Soup(html)
#soup = soup.get(url)
books = soup.find('div', {'class': 'book-'}, partial=True)
def parse(book):
name = book.find('h4').text
price = float(book.find('p').text[1:].split(' ')[0])
return name, price
[parse(book) for book in books]
'''
Traceback (most recent call last):
File "c:/Passport_G/Rob_justpy/jptutorial/gazpacho.py", line 1, in
from gazpacho import get, Soup
File "c:\Passport_G\Rob_justpy\jptutorial\gazpacho.py", line 1, in
from gazpacho import get, Soup
ImportError: cannot import name 'get' from 'gazpacho' (c:\Passport_G\Rob_justpy\jptutorial\gazpacho.py)
Environment:
Windows 10]
from command line
(jp) C:\Passport_G\Rob_justpy\jptutorial>pip install -U gazpacho
Processing c:\users\rober\appdata\local\pip\cache\wheels\db\6b\a2\486f272d5e523b56bd19817c14ef35ec1850644dea78f9dd76\gazpacho-1.1-py3-none-any.whl
Installing collected packages: gazpacho
Successfully installed gazpacho-1.1
WARNING: You are using pip version 20.2.4; however, version 20.3.3 is available.
You should consider upgrading via the 'c:\passport_g\rob_justpy\jptutorial\jp\scripts\python.exe -m pip install --upgrade pip' command.
(jp) C:\Passport_G\Rob_justpy\jptutorial>
(jp) C:\Passport_G\Rob_justpy\jptutorial>python
Python 3.7.6 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Warning:
This Python interpreter is in a conda environment, but the environment has
not been activated. Libraries may fail to load. To activate this environment
please see https://conda.io/activation
Type "help", "copyright", "credits" or "license" for more information.
The text was updated successfully, but these errors were encountered: