Giter Club home page Giter Club logo

Comments (18)

RitwikGupta avatar RitwikGupta commented on September 26, 2024

Could you please paste the entire stack trace?

from pittapi.

RitwikGupta avatar RitwikGupta commented on September 26, 2024

Also, please be aware that I cannot repro this error.
image

from pittapi.

Rahi374 avatar Rahi374 commented on September 26, 2024

Same.
no-repro-pittapi-bug

from pittapi.

azharichenko avatar azharichenko commented on September 26, 2024

@SPN11 Can you give us more details on what the ValueError is telling you?

from pittapi.

SPN11 avatar SPN11 commented on September 26, 2024

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.

azharichenko avatar azharichenko commented on September 26, 2024

@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.

azharichenko avatar azharichenko commented on September 26, 2024

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.

azharichenko avatar azharichenko commented on September 26, 2024

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.

RitwikGupta avatar RitwikGupta commented on September 26, 2024

@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.

azharichenko avatar azharichenko commented on September 26, 2024

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.

SPN11 avatar SPN11 commented on September 26, 2024

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 lxmlInstalls 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.

azharichenko avatar azharichenko commented on September 26, 2024

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.

SPN11 avatar SPN11 commented on September 26, 2024

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.

azharichenko avatar azharichenko commented on September 26, 2024

@SPN11 This looks like it's an issue with lxml, http://lxml.de/installation.html

from pittapi.

RitwikGupta avatar RitwikGupta commented on September 26, 2024

Seems like you have to run STATIC_DEPS=true sudo pip install lxml on macOS

from pittapi.

SPN11 avatar SPN11 commented on September 26, 2024

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.

SPN11 avatar SPN11 commented on September 26, 2024

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.

RitwikGupta avatar RitwikGupta commented on September 26, 2024

No worries! It was a learning experience for us all 😄

from pittapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.