having issue while installing
ve3lst opened this issue · 10 comments
hey there,
im on windows 7 64bit, have python 3.6.1, following the installation guide and i did the first 2 steps without problems (pip install -r requirements.txt and the SECRET_KEY) when i try to do:
./manage.py makemigrations
i get this error at the end
conn = _connect(dsn, connection_factory=connection_factory, **kwasync) django.db.utils.OperationalError: fe_sendauth: no password supplied
here is the full thing:
Veelst@Veelst-PC MINGW64 /c/Server/guyamoe
$ ./manage.py makemigrations
Traceback (most recent call last):
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\base\base.py", line 217, in ensure_connection
self.connect()
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\base\base.py", line 195, in connect
self.connection = self.get_new_connection(conn_params)
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\postgresql\base.py", line 178, in get_new_connection
connection = Database.connect(**conn_params)
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\psycopg2\__init__.py", line 126, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: fe_sendauth: no password supplied
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./manage.py", line 21, in <module>
main()
File "./manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\__init__.py", line 381, in execute_from_command_line
utility.execute()
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\base.py", line 364, in execute
output = self.handle(*args, **options)
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\base.py", line 83, in wrapped
res = handle_func(*args, **kwargs)
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\commands\makemigrations.py", line 101, in handle
loader.check_consistent_history(connection)
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\migrations\loader.py", line 283, in check_consistent_history
applied = recorder.applied_migrations()
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\migrations\recorder.py", line 73, in applied_migrations
if self.has_table():
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\migrations\recorder.py", line 56, in has_table
return self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor())
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\base\base.py", line 256, in cursor
return self._cursor()
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\base\base.py", line 233, in _cursor
self.ensure_connection()
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\base\base.py", line 217, in ensure_connection
self.connect()
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\utils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\base\base.py", line 217, in ensure_connection
self.connect()
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\base\base.py", line 195, in connect
self.connection = self.get_new_connection(conn_params)
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\postgresql\base.py", line 178, in get_new_connection
connection = Database.connect(**conn_params)
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\psycopg2\__init__.py", line 126, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
django.db.utils.OperationalError: fe_sendauth: no password supplied
i tried to ignore it and proceed but i just get it everytime, no idea what to do, sorry if its such a newbie question in python i know nothing about it!
thanks for help
It looks like you're trying to set this up with postgresql so you'll need to specify these sections as needed: https://github.com/appu1232/guyamoe/blob/master/guyamoe/settings.py#L116-L125 including password and port. I do recognize that the install/setup process isn't very good right now though, and part of the reason is that there's no local vs. prod difference. Ideally something like sqlite is enough for local dev.
If you continue to have issues, you might want to look into doing this with docker instead: https://github.com/funkyhippo/guyamoe/tree/docker/docker
i have mysql server if what, idk how i picked postgresql tbh. but i have one so will use it,thanks will do what u told me!
ok. im at 5th step (./manage.py loaddata reader/fixtures/reader_data.json) the thing is, there's no such file in that path. the output:
CommandError: No fixture named 'reader_data' found.
but i found another file in that path called reader_fixtures.json, i tried running the code with it but i get errors :
Veelst@Veelst-PC MINGW64 /c/Server/guyamoe
$ ./manage.py loaddata reader/fixtures/reader_fixtures.json
Traceback (most recent call last):
File "./manage.py", line 21, in <module>
main()
File "./manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\__init__.py", line 381, in execute_from_command_line
utility.execute()
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\base.py", line 364, in execute
output = self.handle(*args, **options)
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\commands\loaddata.py", line 72, in handle
self.loaddata(fixture_labels)
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\commands\loaddata.py", line 114, in loaddata
self.load_label(fixture_label)
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\commands\loaddata.py", line 181, in load_label
obj.save(using=self.using)
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\serializers\base.py", line 223, in save
models.Model.save_base(self.object, using=using, raw=True, **kwargs)
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\models\base.py", line 790, in save_base
update_fields=update_fields, raw=raw, using=using,
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\dispatch\dispatcher.py", line 175, in send
for receiver in self._live_receivers(sender)
File "C:\Users\Veelst\AppData\Local\Programs\Python\Python36\lib\site-packages\django\dispatch\dispatcher.py", line 175, in <listcomp>
for receiver in self._live_receivers(sender)
File "C:\Server\guyamoe\reader\signals.py", line 60, in save_volume
for old_data in os.listdir(os.path.join(MEDIA_ROOT, save_dir)):
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Server\\guyamoe\\media\\manga/Kaguya-Wants-To-Be-Confessed-To/volume_covers/1
i assume i shouldn't run this code with reader_fixtures.json, right?
sorry for the trouble
It fails when it can't find the file required by the fixture. You could get away with not installing the fixtures but a lot of the hardcoded pages (like the homepage) would fail.
You could either create all the files required in reader_fixtures.json
, or use the docker config that appu linked above; it handles generating placeholder files for you (among other things).
okay, thanks! will try docker tomorrow since my internet data is almost at an end and it wanted to download alot of MB so ye
so, i dont want to miss anything up, so i will ask here
i cloned the docker repo, open the guyamoe-docker/docker in cmd, run the command
docker-compose up
it downloaded alot of stuff then this happened:
Successfully built 6de6a27b8185
Successfully tagged docker_web:latest
WARNING: Image for service web was built because it did not already exist. To re
build this image you must use `docker-compose build` or `docker-compose up --bui
ld`.
Creating docker_postgres_1 ... done
Creating docker_memcached_1 ... done
Creating docker_web_1 ... error
ERROR: for docker_web_1 Cannot create container for service web: invalid mount
config for type "bind": bind source path does not exist: /c/Server/guyamoe-docke
r
ERROR: for web Cannot create container for service web: invalid mount config fo
r type "bind": bind source path does not exist: /c/Server/guyamoe-docker
ERROR: Encountered errors while bringing up the project.
what do i do here?
using DockerToolbox 19.03.1 btw
That's strange; I can (unreliably) reproduce your behaviour if I rename the directory after building the repository.
Try restarting the Docker daemon by right clicking on the Docker program in your system tray and selecting "Restart...", then run docker-compose up
again.
If that doesn't work, try this: in your command prompt (or whatever you're using):
docker run -it --rm -v C:/:/c alpine /bin/sh
This will launch an interactive shell in an alpine linux image. It should show you a new prompt, that looks something like:
/ #
Now do:
cd c/Server/guyamoe-docker/docker
ls
What's the output of ls
?
sorry and thanks!
i restarted the whole pc since i dont see docker in tray,
C:\Server\guyamoe-docker\docker>docker-compose up
ERROR: Couldn't connect to Docker daemon - you might need to run `docker-machine
start default`.
so next i tried what u suggested (docker run -it --rm -v C:/:/c alpine /bin/sh), i know it;s not the right thing to do, but wanted to be sure:
C:\Server\guyamoe-docker\docker>docker run -it --rm -v C:/:/c alpine /bin/sh
docker: error during connect: Post https://192.168.99.100:2376/v1.40/containers/
create: dial tcp 192.168.99.100:2376: connectex: A connection attempt failed bec
ause the connected party did not properly respond after a period of time, or est
ablished connection failed because connected host has failed to respond.
See 'docker run --help'.
i tried running docker from cmd as i was told in the first output, it started nicely:
C:\Server\guyamoe-docker\docker>docker-machine start default
Starting "default"...
(default) Check network to re-create if needed...
(default) Windows might ask for the permission to configure a dhcp server. Somet
imes, such confirmation window is minimized in the taskbar.
(default) Waiting for an IP...
Machine "default" was started.
Waiting for SSH to be available...
Detecting the provisioner...
Started machines may have new IP addresses. You may need to re-run the `docker-m
achine env` command.
then:
C:\Server\guyamoe-docker\docker>docker run -it --rm -v C:/:/c alpine /bin/sh
Unable to find image 'alpine:latest' locally
latest: Pulling from library/alpine
aad63a933944: Pull complete
Digest: sha256:b276d875eeed9c7d3f1cfa7edb06b22ed22b14219a7d67c52c56612330348239
Status: Downloaded newer image for alpine:latest
docker: Error response from daemon: invalid mode: /c.
See 'docker run --help'.
if what, all i did is install DockerToolbox, did nothing to it didnt even use it except this time
Ah, I missed that you were using Docker Toolbox. It works a bit different from Docker for Windows, so that bind mount (and sanity check) wouldn't work.
Does docker-compose up
for the project still fail after running docker-machine start default
? I can try to walk you through the steps more interactively if you join the Kaguya discord and ping me in #tech-science
.
thanks the issue solved over discord, much appreciated!