Comments (18)
Could you please paste the entire stack trace?
from pittapi.
Also, please be aware that I cannot repro this error.
from pittapi.
from pittapi.
@SPN11 Can you give us more details on what the ValueError
is telling you?
from pittapi.
I'm sorry for just responding to this. I'm no longer receiving the ValueError, but now I'm receiving the following error from the same line:
Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?
You might have seen it in the Slack.
I don't believe there is an issue with the WebWrapper. I am hosting and testing this on my MacBook Pro which might be interfering with the Python built-in HTML parser. I have the lxml package installed though and the virtual environment is enabled. No one else able to reproduce the ValueError, but is anyone able to reproduce the above message?
from pittapi.
@SPN11 Yeah, I saw that in the Slack Chat. So this is exclusively just an issue with BeautifulSoup
not being able to find the lxml
package. I'm going to see if I can able reproduce this, and I'll give you my exact steps of how I setup it up.
from pittapi.
I like @RitwikGupta and @Rahi374 wasn't able to reproduce that same error. Here is the log of the commands I used.
cd Documents/
git clone https://github.com/Pitt-CSC/PittAPIWebWrapper.git --recurse-submodules
cd PittAPIWebWrapper/
git submodule update --remote --merge
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
pip install -r apiwrapper/PittAPI/requirements.txt
python server.py
I'm going to try rerunning this on a fresh installation of Ubuntu to see if I can reproduce the same error.
from pittapi.
I went through rerunning this again on a new installation of Ubuntu with theses commands...
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install git
sudo apt-get install python3-pip
cd Documents/
git clone https://github.com/Pitt-CSC/PittAPIWebWrapper.git
cd PittAPIWebWrapper/apiwrapper
git clone https://github.com/Pitt-CSC/PittAPI.git
cd ..
pip3 install virtualenv --user
virtualenv venv
source venv/bin/activate
pip3 install -r requirements.txt
pip3 install -r apiwrapper/PittAPI/requirements.txt
python3 server.py
and still wasn't able to reproduce the same error. Currently, all I can think that could be messing you up is using commands that use Python 2.7 instead of Python 3.5. You may be using the 2.7 of pip
which doesn't install all the packages properly for 3.5 and that might be messing it up. But, not quite sure if you are able to, can you provide all the commands used to perform the error and the version of pip
and python
you are using?
python --version
pip --version
Update:
Just reproduced same error after uninstalling lxml
.
{"error": "Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?"}
from pittapi.
@azharichenko lxml
needs to be installed, so uninstalling it will give you that error. The requirements file should install lxml
without an issue.
@SPN11 Can you check that you're using Python 3 and not 2.7?
from pittapi.
I just wanted to see if I could reproduce the error, hence why I uninstalled it. Otherwise doing pip install
on the requirements from PittAPI installs it properly.
from pittapi.
I imagined it had something to do with lxml
not being properly and BeautifulSoup not being able to find the package. Here is my log of commands:
git submodule update --remote --merge
No changes
source bin/activate
python --version
3.5
pip --version
9.0.1
pip install -r requirements.txt
pip install -r apiwrapper/PittAPI/requirements.txt
No changes anywhere
pip uninstall lxml
Uninstalls successfully
pip install lxml
Installs successfully (but is using cached data... would that be an issue?)
python server.py
I type into my address bar http://localhost:5000/lab_status/hillman
and I still receive the same exact error.
If no one else is able to reproduce the error (except by uninstalling lxml), then it must be an issue on my end... I'm sorry if I'm wasting people's time with this.
from pittapi.
Can you give me the full response that pip --version gives because at the end will tell me whether it's pip for Python 3 or 2
from pittapi.
I should have specified that it was for Python 3.5. Here's the full response:
pip 9.0.1 from /Users/snigh16/Desktop/PittAPIWebWrapper/lib/python3.5/site-packages (python 3.5)
from pittapi.
@SPN11 This looks like it's an issue with lxml
, http://lxml.de/installation.html
from pittapi.
Seems like you have to run STATIC_DEPS=true sudo pip install lxml
on macOS
from pittapi.
I tried that too. I tried uninstalling it. I tried re-installing python, re-cloning the repository, re-installing the dependencies, and everything. I don't know why it doesn't recognize it. If no one else can reproduce the issue it must be me.
from pittapi.
In the end it all boiled down to testing on Mac OSX. I'm retrieving the data and all is working as intended. Sorry, everyone.
from pittapi.
No worries! It was a learning experience for us all
from pittapi.
Related Issues (20)
- Use LaundryView's JSON API instead of BeautifulSoup HOT 2
- Issues with Shuttle API's get_vehicle_route_stop_estimates HOT 1
- IndexError when getting extra details for section HOT 1
- Exception of course caused by the edge case HOT 3
- Courses HTML Page is updated so scraping is incorrect HOT 1
- Making the package name lowercase HOT 1
- Moving docs onto readthedocs
- Switch from unittest to pytest
- Fixing up the docstrings in sports api
- Adding typing information into sports api
- Looking over the data results of sports api
- People api seems to be dead.
- Any API using m.pitt.edu are dead, new scrapers needed!
- make PittAPI actually an API HOT 4
- Unit tests should be hermetic HOT 1
- Create a Library API HOT 1
- People API is broken HOT 2
- README.md issues HOT 4
- As of this term, the Course API is broken HOT 2
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 pittapi.