Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how i can run forkpi #2

Open
eXplOiD1 opened this issue Jan 24, 2018 · 8 comments
Open

how i can run forkpi #2

eXplOiD1 opened this issue Jan 24, 2018 · 8 comments

Comments

@eXplOiD1
Copy link

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
Copy link

dimkal88 commented Feb 6, 2018

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
Copy link
Author

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
Copy link

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
Copy link

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
Copy link

dimkal88 commented Mar 24, 2018 via email

@doomhaMwx
Copy link

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

@mikha8493
Copy link

Has anyone got this to work?

@dimkal88
Copy link

dimkal88 commented Apr 27, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants