Sketchy502 / SDV-Summary

An application to display a summary of the player from a Stardew Valley save file.
206 stars 21 forks source link

RFC - Add some startup development instructions #48

Closed cheshire137 closed 5 years ago

cheshire137 commented 5 years ago

Hi @Sketchy502! I got a bit further following your instructions in https://github.com/Sketchy502/SDV-Summary/issues/46#issuecomment-451305830 but I hit another error when I try to run the app:

% FLASK_APP=runserver.py flask run
 * Serving Flask app "runserver.py"
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: off
Usage: flask run [OPTIONS]

Error: While importing "runserver", an ImportError was raised:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 235, in locate_app
    __import__(module_name)
  File "/Users/cheshire137/code/Sketchy502/SDV-Summary/runserver.py", line 13, in <module>
    from sdv import app
  File "/Users/cheshire137/code/Sketchy502/SDV-Summary/sdv/__init__.py", line 12, in <module>
    from google_measurement_protocol import Event, report
ImportError: cannot import name 'Event'

Could you tell me if the instructions I've added to README.md are accurate? Doing those steps was what let me get to this point ☝️ but since the app isn't running yet, I may have done something wrong! Thanks for your help.

Sketchy502 commented 5 years ago

The additions look great, my only suggestion is to install the project requirements using the requirements.txt file as this will ensure the correct versions of the requirements are also installed. This can be achieved by running pip install -r requirements.txt from the projects root directory

Installing the requirements in this way should also fix the issue that you seeing since the project was initially created with an older version of google_measurement_protocol.

cheshire137 commented 5 years ago

Oh dang, I meant to get back to this and use requirements.txt like you suggested! I'll try to open another PR doing such, sorry about that!

Sketchy502 commented 5 years ago

No problem, I half forgot about this myself. I updated the README myself as it was a minor change and I wanted to do a little spring cleaning 😄

Hopefully you are able to get the project up and running now, but if you do have any issue please let me know.