Giter VIP home page Giter VIP logo

Comments (9)

botingzhang avatar botingzhang commented on July 17, 2024 1

Thank you so much for your speedy responses and fixes!! You have no idea how much this means to my partner haha ... he's so excited.

from camply.

juftin avatar juftin commented on July 17, 2024

Hey @botingzhang , thanks for reporting the error. This is actually a Pydantic JSON Validation Error:

ValidationError: 2 validation errors for AvailableCampsite
permitted_equipment
  value is not a valid list (type=type_error.list)
campsite_attributes
  value is not a valid list (type=type_error.list)

These are new attributes so I must've messed something up when defining the JSON objects.

Do you have the campsite IDs or the camply command you ran to raise that error?

from camply.

juftin avatar juftin commented on July 17, 2024

And regarding your dropbox folder, that's kind of confusing. I would expect pydantic to be at /home/bo/.local/lib/python3.8/site-packages/pydantic/ and not your DropBox folder - hopefully that's not the issue here

from camply.

botingzhang avatar botingzhang commented on July 17, 2024

Here's an example -- it runs through and gives me the exit message, then the Traceback at the end:

camply campsites --campsite 84865 --campsite 84001 --start-date 2022-07-27 --end-date 2022-07-28

But if I call just one campsite, for example either of the below, it runs fine:

camply campsites --campsite 84865 --start-date 2022-07-27 --end-date 2022-07-28
camply campsites --campsite 84001 --start-date 2022-07-27 --end-date 2022-07-28

pydantic is indeed in the path /home/bo/.local/lib/python3.8/site-packages/pydantic/. I'm not quite sure why it's searching for it in my dropbox either! It doesn't throw the error for any other searches I'm trying, and when I check my python path it seems to be pointing to the right places:

$ python3
Python 3.8.10 (default, Jun 22 2022, 20:18:18) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> for path in sys.path:
...     print(path)
... 

/usr/lib/python38.zip
/usr/lib/python3.8
/usr/lib/python3.8/lib-dynload
/home/bo/.local/lib/python3.8/site-packages
/usr/local/lib/python3.8/dist-packages
/usr/lib/python3/dist-packages

(I did also try the same commands on my partner's Windows computer with Python 3.10 installed and got the same outcome.)

from camply.

botingzhang avatar botingzhang commented on July 17, 2024

Oh, and in case I wasn't clear before, it searches Dropbox because that's where I had run the script from yesterday ... when I run camply from my home folder it says at the bottom of the traceback:

│ /home/bo/pydantic/main.py:341 in pydantic.main.BaseModel.__init__                                │
│                                                                                                  │
│ [Errno 2] No such file or directory: '/home/bo/pydantic/main.py'                                 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

from camply.

botingzhang avatar botingzhang commented on July 17, 2024

Here are the full outputs with commands, if useful:
outputs.txt

from camply.

juftin avatar juftin commented on July 17, 2024

Alright @botingzhang, I've fixed the issue. When supplying multiple campsites a function was returning a pandas Series instead of a list. Final testing is currently running. This issue will auto-resolve when I merge the code and you can update to the latest version of camply to resolve the issue. 🎊

from camply.

juftin avatar juftin commented on July 17, 2024

Even cooler, I've added the option to get more information from tracebacks by showing all local variables from the frames in the traceback. Updating your command to camply --debug campsites --campsite 84865 --campsite 84001 --start-date 2022-07-27 --end-date 2022-07-28 will provide (almost too much) context about the data failures once the fix is merged.

from camply.

juftin avatar juftin commented on July 17, 2024

One more follow up here, sorry for the late fix. There was some strangeness going on in the Python 3.6 Unit Tests. Everything is good to go @botingzhang

from camply.

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.