Comments (12)
Sorry, there's a missing step in the install instructions - you need to set up an environment variable containing the Django Secret Key. I'll update the documentation ASAP
from priceandnutritiontrackingsystem.
Updated in e396f37
from priceandnutritiontrackingsystem.
Hi Dylan,
Thanks for getting back to me!! (btw, love the committment to writing clear instructions) Getting a lot closer, but still no joy. Since you're obviously serious about getting the docs right, here's my feedback, First, I think you should add this line:
git clone https://github.com/dylanleigh/PriceAndNutritionTrackingSystem.git
cd PriceAndNutritionTrackingSystem # add this line
pip install -r requirements.txt
Now on to where I'm at. :)
After setting the secret key, I got this error:
File "/home/pi/pants/local/lib/python2.7/site-packages/django_filters/filterset.py", line 184
def init(self, data=None, queryset=None, *, request=None, prefix=None):
^
SyntaxError: invalid syntax
After doing some research, I found this:
"My two cents: As @9769953 and @livonia said the version of django-filter you are using uses in https://github.com/carltongibson/django-filter/blob/master/django_filters/filterset.py#L184 a Python 3.x syntax not compatible with Python 2.7 so this version. The new syntax is specified on https://www.python.org/dev/peps/pep-3102/.
The error that your are getting is on line 184:
File "/Library/Python/2.7/site-packages/django_filters/filterset.py", line 184
def init(self, data=None, queryset=None, *, request=None, prefix=None):
^
SyntaxError: invalid syntax
So:
pip install "django-filter<2.0 "
So I used the pip command, and now I'm getting this error:
File "/home/pi/pants/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 899, in execute_sql
raise original_exception
django.db.utils.OperationalError: no such table: auth_user
To make sure that I'm not making a newbie error (just starting out with python), here's how I'm creating the virtual environment:
virtualenv -p /usr/bin/python2.7 pants
Thanks again for all your hard work!!!
from priceandnutritiontrackingsystem.
an addendum (just noticed the copy/paste didn't work quite right). the caret is pointing to the comma after the asterisk:
File "/home/pi/pants/local/lib/python2.7/site-packages/django_filters/filterset.py", line 184
def init(self, data=None, queryset=None, *, request=None, prefix=None):
^
from priceandnutritiontrackingsystem.
darn, still didn't work right, second attempt:
an addendum (just noticed the copy/paste didn't work quite right). the caret is pointing to the comma after the asterisk:
File "/home/pi/pants/local/lib/python2.7/site-packages/django_filters/filterset.py", line 184
def init(self, data=None, queryset=None, *, request=None, prefix=None):
-------------------------------------------^
ignore the dashes
from priceandnutritiontrackingsystem.
Thanks @JeffCdev - I'm still updating the Installation docs.
I'm going to include Python 3+ in requirements from now on as many libraries are deprecating Python 2, that should also resolve the syntax issues.
from priceandnutritiontrackingsystem.
Thanks Dylan! Just FYI, I have tried the install under python 3.7, also with no joy. I am really looking forward to trying out your work. (so much so that I tried to hack my way through to remove the need to login just to see how things would work, without very much luck :) )
from priceandnutritiontrackingsystem.
Hi Dylan, Woo Hoo, up and running. A few notes/comments. After the initial install, and reaching this point in the instructions:
./manage.py createsuperuser
The process will throw a warning about unapplied migrations, and fail with the error:
no such table: auth_user
After running python manage.py migrate, I was able to run ./manage.py createsuperuser successfully.
However, I ran into issues with the initial error error being ObjectDoesNotExist is not defined. I went ahead and created a second user, and logged in via the admin interface, and then tried the website. I then saw errors: Target Matching Query Does Not Exist with daily_Target = True showing up earlier in the log. Thinking it might be related to the user, I went ahead and filled in a daily target info for the new user. I then ran into KeyErrors: protein_per_j. I then set up the user completely (all targets) leaving no fields blank. At this point, I was able to access the website. So, I think you might want to either add a "sample user" to populate the database to prevent this issue, and/or modify the code.
Thank you so very, very much for this project! Now that I'm able to run it, I am looking forward to exploring its functionality.
from priceandnutritiontrackingsystem.
Thanks @JeffCdev for all the reports - I haven't had time to look at it this week but as soon as I can I will fix the code so these missing object issues won't occur on a fresh install.
from priceandnutritiontrackingsystem.
These haven't been tested on a fresh install yet, but don't break an existing install or unit tests:
Initial migration added to docs in 82cbdfb
Fixed Target;s Exceptions called incorrectly in a4b934b
Fixed home page missing defaults if protein_per_j and fibre_per_j can't be derived from the daily target in 4a8bba7
from priceandnutritiontrackingsystem.
Thanks Dylan! I have to tell you, now that I've had a chance to work with your app, you've done spectacular work. The thought that you've put into the app shows you really understand what people will want to track, and I very much look forward to your future work. I do have a couple of suggestions. First, the addition of ingredients. I'm from the states, so we're still kcal rather than kj, but I've been using an Aussie website to get data. However, even with that site, kj per kilogram is a bit like furloughs per fortnight. :) Having functionality that would allow a user to enter kj (or kcal) and other nutritional info by the suggested serving in grams (like what is listed on the nutritional data section of a package) and then converting it to kilograms would really enhance the user experience. Second, I'm assuming based on the personal info that you've shared that the reason you're putting so much time and effort into the project is that you are concerned about your health. So, my second suggestion would be to add some type of bio-metric info that could be track along with nutrition so that a person could see the results. Just adding body weight at a date would be great, but other info (bmi, blood pressure, etc.) would be useful. I'm going to hold off on redoing an install at this point, since I'm concerned about losing all of the ingredient info I've entered so far, but when I have some time, I'll set up another virtual environment and do a second install and let you know how it goes. Again, thank you very much!
from priceandnutritiontrackingsystem.
Sorry I missed your comment @JeffCdev , for some reason I didn't get a notification.
Glad you're finding the app useful, and thanks for all your feedback.
Regarding data entry: I've added some new TODOs to the roadmap to make data entry easier (including allowing per-something other than kg entry). Also there is now a fixture with some sample ingredient data including basics like eggs, flour, oats etc.
Biometrics: This has been planned for a while, there is a section in the roadmap for adding diary entries for exercise sessions and recording metrics (blood pressure, pulse etc). The diary code is already set up to be compatible non-food entries although none have been implemented yet.
from priceandnutritiontrackingsystem.
Related Issues (8)
- Error when adding the author's sample Ingredient data: user `testuserbob` doesn't exist
- Adding an ingredient component with a weight of 0 causes a recipe to be unviewable
- What nutrition data is available should be provided by the API, and standardized server side.
- Add importing of ingredients from standardized sources
- "object 'Target' has no attribute 'ObjectDoesNotExist'" with fresh install HOT 3
- TemplateSyntaxError at /wearpants/ HOT 2
- Future front end developments HOT 6
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 priceandnutritiontrackingsystem.