kieferyap / forkpi

ForkPi: An open-source door access control system with Raspberry Pi. Done for my undergrad project with @matthewdeeco
43 stars 17 forks source link

how i can run forkpi #2

Open eXplOiD1 opened 6 years ago

eXplOiD1 commented 6 years ago

i dont found a way to run forkpi as service or something.

root@exploid-werkstatt:~/forkpi/forkpi# ./runserver Traceback (most recent call last): File "manage.py", line 8, in from django.core.management import execute_from_command_line ImportError: No module named 'django'

dimkal88 commented 6 years ago

I have the same problem I cant find out how to start the server.

I have something helpfull. Follow it until step 7. http://raspberrypituts.com/django-raspberry-pi-tutorial/

and edit runserver sudo nano runserver edit python3 to python

I end with this error File "/home/pi/forkpi/forkpi/forkpi/urls.py", line 20, in urlpatterns = patterns('', NameError: name 'patterns' is not defined

any ideas?

eXplOiD1 commented 6 years ago

exploid@Werkstatt-Server:~/accesscontrol/forkpi$ $ sudo python3 manage.py runserver 192.168.3.29:8080 sudo: o: command not found exploid@Werkstatt-Server:~/accesscontrol/forkpi$ sudo python3 manage.py runserver 192.168.3.29:8080 Unhandled exception in thread started by <function check_errors..wrapper at 0x751ef0c0> Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/django/utils/autoreload.py", line 225, in wrapper fn(*args, *kwargs) File "/usr/local/lib/python3.5/dist-packages/django/core/management/commands/runserver.py", line 113, in inner_run autoreload.raise_last_exception() File "/usr/local/lib/python3.5/dist-packages/django/utils/autoreload.py", line 248, in raise_last_exception raise _exception[1] File "/usr/local/lib/python3.5/dist-packages/django/core/management/init.py", line 327, in execute autoreload.check_errors(django.setup)() File "/usr/local/lib/python3.5/dist-packages/django/utils/autoreload.py", line 225, in wrapper fn(args, **kwargs) File "/usr/local/lib/python3.5/dist-packages/django/init.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/local/lib/python3.5/dist-packages/django/apps/registry.py", line 112, in populate app_config.import_models() File "/usr/local/lib/python3.5/dist-packages/django/apps/config.py", line 198, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python3.5/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 986, in _gcd_import File "", line 969, in _find_and_load File "", line 958, in _find_and_load_unlocked File "", line 673, in _load_unlocked File "", line 665, in exec_module File "", line 222, in _call_with_frames_removed File "/home/exploid/accesscontrol/forkpi/records/models.py", line 24, in class Log(Model): File "/home/exploid/accesscontrol/forkpi/records/models.py", line 26, in Log door = ForeignKey('Door') TypeError: init() missing 1 required positional argument: 'on_delete'

dimkal88 commented 6 years ago

I run these two commands sudo pip3 install Django sudo apt-get install python3-pip and now I end up with this File "/usr/local/lib/python3.5/dist-packages/django/db/backends/postgresql/base.py", line 24, in raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e) django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: No module named 'psycopg2'

doomhaMwx commented 6 years ago

Hello! In part 3.1.2 of the installation/setup process, I am getting a "404: not found" error. It appears that a needed file has already been removed/deleted, or do I need to do something first for this to work? Thanks.

capture

dimkal88 commented 6 years ago

You need to tray different version. I think is 1.7.1

Με εκτίμηση Καλτσίδης Δημήτρης

Στις Σάβ, 24 Μαρ 2018, 12:48 μ.μ. ο χρήστης doomhaMwx < notifications@github.com> έγραψε:

Hello! In part 3.1.2 of the installation/setup process, I am getting a "404: not found" error. It appears that a needed file has already been removed/deleted, or do I need to do something first for this to work? Thanks.

[image: capture] https://user-images.githubusercontent.com/37734069/37863117-95135028-2f93-11e8-8a02-8a4847bd1b9b.PNG

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kieferyap/forkpi/issues/2#issuecomment-375870370, or mute the thread https://github.com/notifications/unsubscribe-auth/AiiD5ae1O_jkEyDSyPUm5Xy-4AUngMsiks5thiRpgaJpZM4RrLot .

doomhaMwx commented 6 years ago

So once I have all the files needed (.py files, etc...), what comes next after that?

mikha8493 commented 6 years ago

Has anyone got this to work?

dimkal88 commented 6 years ago

I didn't have any time to work with it. If you find out something please share.

Στις Παρ, 27 Απρ 2018, 6:50 μ.μ. ο χρήστης mikha8493 < notifications@github.com> έγραψε:

Has anyone got this to work?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kieferyap/forkpi/issues/2#issuecomment-385012674, or mute the thread https://github.com/notifications/unsubscribe-auth/AiiD5eO4toK-uo67oiXb37as3dkxsnXkks5tsz4-gaJpZM4RrLot .