Skip to content

Latest commit

 

History

History
138 lines (88 loc) · 3.99 KB

FAQ.md

File metadata and controls

138 lines (88 loc) · 3.99 KB

CS Build Week 1 FAQ

Contents

Install

Backend

Answers

I'm getting a huge error/something about ssl when installing psycopg2 with pipenv install

Mac only! These instructions won't work for Windows!

Buried at the bottom of this error message is something that looks like this:

build/temp.macosx-10.14-x86_64-3.7/psycopg/microprotocols_proto.o
build/temp.macosx-10.14-x86_64-3.7/psycopg/typecast.o -L/usr/local/lib -lpq -lssl -lcrypto -o
build/lib.macosx-10.14-x86_64-3.7/psycopg2/_psycopg.cpython-37m-darwin.so',
'    ld: library not found for -lssl',
'    clang: error: linker command failed with exit code 1 (use -v to see invocation)',
"    error: command 'clang' failed with exit status 1", '    ----------------------------------------'

If you don't have brew installed, install it.

Then:

brew install openssl
sudo cp $(brew --prefix openssl)/lib/libssl.1.1.dylib /usr/local/lib
sudo cp $(brew --prefix openssl)/lib/libcrypto.1.1.dylib /usr/local/lib
sudo ln -s /usr/local/lib/libssl.1.1.dylib /usr/local/lib/libssl.dylib
sudo ln -s /usr/local/lib/libcrypto.1.1.dylib /usr/local/lib/libcrypto.dylib

then try pipenv install again.


I'm getting a 404 when I try to register

The password needs to be at least 8 characters and include a number.


pipenv command not found

Install pipenv if not already installed.

On Windows, try a different shell, e.g. cmd.exe or PowerShell.


pg_config command not found

If you get this when running pipenv install, first do this:

export PATH="/Applications/Postgres.app/Contents/Versions/10/bin:$PATH"

then run pipenv install again. This should fix it going forward.


Do I need to add models to api/models.py?

It says

# Create your models here.

but that's just boilerplate that Django made when the project was created. You can ignore it.

All the models that matter are in adventure/models.py.


Error: AnonymousUser object has no attribute player

This means the server has failed to authenticate your request. Make sure the token is in the request header in the form:

Authorization: Token 0123456789ABCDEF01234567890

Heroku: Pipfile.lock is out of date

First run

pipenv lock

to regenerate the lockfile.

Then make sure Pipfile.lock is commited to git.

Then push to heroku.


* OneDrive user getting PermissionError: [Errno 13] Permission denied when running pipenv install django](#q800)

Creating your Django project within OneDrive causes problems.

Repeat setup & install steps in a new directory, outside of OneDrive.