thiagopena / djangoSIGE

Sistema Integrado de Gestão Empresarial baseado em Django
http://djangosige.com.br
MIT License
423 stars 252 forks source link

Estou com problemas na instalação #42

Closed marcosjuniorpr closed 6 years ago

marcosjuniorpr commented 6 years ago

Boa tarde vê se podem me ajudar, estou tentando instalar o programa, mas quando faço o comando python manage.py migrate ele dá esse erro abaixo: Alguém sabe me dizer o porque? ERRORS: cadastro.Categoria: (auth.E005) The permission codenamed 'view_categoria' clashes with a builtin permission for model 'cadastro.Categoria'. cadastro.Cliente: (auth.E005) The permission codenamed 'view_cliente' clashes with a builtin permission for model 'cadastro.Cliente'. cadastro.Empresa: (auth.E005) The permission codenamed 'view_empresa' clashes with a builtin permission for model 'cadastro.Empresa'. cadastro.Fornecedor: (auth.E005) The permission codenamed 'view_fornecedor' clashes with a builtin permission for model 'cadastro.Fornecedor'. cadastro.Marca: (auth.E005) The permission codenamed 'view_marca' clashes with a builtin permission for model 'cadastro.Marca'. cadastro.Produto: (auth.E005) The permission codenamed 'view_produto' clashes with a builtin permission for model 'cadastro.Produto'. cadastro.Transportadora: (auth.E005) The permission codenamed 'view_transportadora' clashes with a builtin permission for model 'cadastro.Transportadora'. cadastro.Unidade: (auth.E005) The permission codenamed 'view_unidade' clashes with a builtin permission for model 'cadastro.Unidade'. compras.OrcamentoCompra: (auth.E005) The permission codenamed 'view_orcamentocompra' clashes with a builtin permission for model 'compras.OrcamentoCompra'. compras.PedidoCompra: (auth.E005) The permission codenamed 'view_pedidocompra' clashes with a builtin permission for model 'compras.PedidoCompra'. estoque.LocalEstoque: (auth.E005) The permission codenamed 'view_localestoque' clashes with a builtin permission for model 'estoque.LocalEstoque'. estoque.MovimentoEstoque: (auth.E005) The permission codenamed 'view_movimentoestoque' clashes with a builtin permission for model 'estoque.MovimentoEstoque'. financeiro.Lancamento: (auth.E005) The permission codenamed 'view_lancamento' clashes with a builtin permission for model 'financeiro.Lancamento'. financeiro.PlanoContasGrupo: (auth.E005) The permission codenamed 'view_planocontasgrupo' clashes with a builtin permission for model 'financeiro.PlanoContasGrupo'. fiscal.GrupoFiscal: (auth.E005) The permission codenamed 'view_grupofiscal' clashes with a builtin permission for model 'fiscal.GrupoFiscal'. fiscal.NaturezaOperacao: (auth.E005) The permission codenamed 'view_naturezaoperacao' clashes with a builtin permission for model 'fiscal.NaturezaOperacao'. fiscal.NotaFiscalEntrada: (auth.E005) The permission codenamed 'view_notafiscalentrada' clashes with a builtin permission for model 'fiscal.NotaFiscalEntrada'. vendas.CondicaoPagamento: (auth.E005) The permission codenamed 'view_condicaopagamento' clashes with a builtin permission for model 'vendas.CondicaoPagamento'. vendas.OrcamentoVenda: (auth.E005) The permission codenamed 'view_orcamentovenda' clashes with a builtin permission for model 'vendas.OrcamentoVenda'. vendas.PedidoVenda: (auth.E005) The permission codenamed 'view_pedidovenda' clashes with a builtin permission for model 'vendas.PedidoVenda'.

victtorvpb commented 6 years ago

@marcosjuniorpr tenta usar a versão 2.0 do Django e não a que está no requeriments.

marcosjuniorpr commented 6 years ago

resolveu um e apareceu outro. Se puder me ajudar mais uma vez agradeço..

C:\djangoSIGE-master>python manage.py migrate Traceback (most recent call last): File "C:\Python 3.6.5\lib\site-packages\django\db\backends\base\base.py", line 216, in ensure_connection self.connect() File "C:\Python 3.6.5\lib\site-packages\django\db\backends\base\base.py", line 194, in connect self.connection = self.get_new_connection(conn_params) File "C:\Python 3.6.5\lib\site-packages\django\db\backends\sqlite3\base.py", line 162, in get_new_connection conn = Database.connect(**conn_params) sqlite3.OperationalError: unable to open database file

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "manage.py", line 23, in execute_from_command_line(sys.argv) File "C:\Python 3.6.5\lib\site-packages\django\core\management__init__.py", line 371, in execute_from_command_line utility.execute() File "C:\Python 3.6.5\lib\site-packages\django\core\management__init.py", line 365, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "C:\Python 3.6.5\lib\site-packages\django\core\management\base.py", line 288, in run_from_argv self.execute(*args, *cmd_options) File "C:\Python 3.6.5\lib\site-packages\django\core\management\base.py", line 335, in execute output = self.handle(args, **options) File "C:\Python 3.6.5\lib\site-packages\django\core\management\commands\migrate.py", line 79, in handle executor = MigrationExecutor(connection, self.migration_progress_callback) File "C:\Python 3.6.5\lib\site-packages\django\db\migrations\executor.py", line 18, in init self.loader = MigrationLoader(self.connection) File "C:\Python 3.6.5\lib\site-packages\django\db\migrations\loader.py", line 49, in init self.build_graph() File "C:\Python 3.6.5\lib\site-packages\django\db\migrations\loader.py", line 206, in build_graph self.applied_migrations = recorder.applied_migrations() File "C:\Python 3.6.5\lib\site-packages\django\db\migrations\recorder.py", line 61, in applied_migrations if self.has_table(): File "C:\Python 3.6.5\lib\site-packages\django\db\migrations\recorder.py", line 44, in has_table return self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()) File "C:\Python 3.6.5\lib\site-packages\django\db\backends\base\base.py", line 255, in cursor return self._cursor() File "C:\Python 3.6.5\lib\site-packages\django\db\backends\base\base.py", line 232, in _cursor self.ensure_connection() File "C:\Python 3.6.5\lib\site-packages\django\db\backends\base\base.py", line 216, in ensure_connection self.connect() File "C:\Python 3.6.5\lib\site-packages\django\db\utils.py", line 89, in exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "C:\Python 3.6.5\lib\site-packages\django\db\backends\base\base.py", line 216, in ensure_connection self.connect() File "C:\Python 3.6.5\lib\site-packages\django\db\backends\base\base.py", line 194, in connect self.connection = self.get_new_connection(conn_params) File "C:\Python 3.6.5\lib\site-packages\django\db\backends\sqlite3\base.py", line 162, in get_new_connection conn = Database.connect(**conn_params) django.db.utils.OperationalError: unable to open database file

victtorvpb commented 6 years ago

Cara,tu gerou o arquivo .env? Ou na pasta que vc tá usando tem permissão? Parece que ele não tá conseguindo abrir o arquivo sqlite, tenta apagar ele e o Django vai criar de novo.

marcosjuniorpr commented 6 years ago

Sim gera a .env normal na pasta contrib, depois vou lá e gero o manage.py migrate continua dando erro.

C:\djangoSIGE-master>python manage.py migrate Traceback (most recent call last): File "manage.py", line 23, in execute_from_command_line(sys.argv) File "C:\Python 3.6.5\lib\site-packages\django\core\management__init.py", line 371, in execute_from_command_line utility.execute() File "C:\Python 3.6.5\lib\site-packages\django\core\management__init.py", line 317, in execute settings.INSTALLED_APPS File "C:\Python 3.6.5\lib\site-packages\django\conf__init.py", line 56, in getattr__ self._setup(name) File "C:\Python 3.6.5\lib\site-packages\django\conf__init__.py", line 43, in _setup self._wrapped = Settings(settings_module) File "C:\Python 3.6.5\lib\site-packages\django\conf\init.py", line 106, in init mod = importlib.import_module(self.SETTINGS_MODULE) File "C:\Python 3.6.5\lib\importlib\init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "C:\djangoSIGE-master\djangosige\configs\init.py", line 3, in from .settings import * File "C:\djangoSIGE-master\djangosige\configs\settings.py", line 14, in SECRET_KEY = config('SECRET_KEY') File "C:\Python 3.6.5\lib\site-packages\decouple.py", line 197, in call return self.config(*args, **kwargs) File "C:\Python 3.6.5\lib\site-packages\decouple.py", line 85, in call__ return self.get(*args, **kwargs) File "C:\Python 3.6.5\lib\site-packages\decouple.py", line 70, in get raise UndefinedValueError('{} not found. Declare it as envvar or define a default value.'.format(option)) decouple.UndefinedValueError: SECRET_KEY not found. Declare it as envvar or define a default value.

rg3915 commented 6 years ago

Criei um PR #3 que corrige isso.

marcosjuniorpr commented 6 years ago

Continua o erro :/ C:\djangoSIGE-master>python manage.py migrate Traceback (most recent call last): File "manage.py", line 23, in execute_from_command_line(sys.argv) File "C:\Python 3.6.5\lib\site-packages\django\core\management__init.py", line 371, in execute_from_command_line utility.execute() File "C:\Python 3.6.5\lib\site-packages\django\core\management__init.py", line 317, in execute settings.INSTALLED_APPS File "C:\Python 3.6.5\lib\site-packages\django\conf__init.py", line 56, in getattr__ self._setup(name) File "C:\Python 3.6.5\lib\site-packages\django\conf__init__.py", line 43, in _setup self._wrapped = Settings(settings_module) File "C:\Python 3.6.5\lib\site-packages\django\conf\init.py", line 106, in init mod = importlib.import_module(self.SETTINGS_MODULE) File "C:\Python 3.6.5\lib\importlib\init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "C:\djangoSIGE-master\djangosige\configs\init.py", line 3, in from .settings import * File "C:\djangoSIGE-master\djangosige\configs\settings.py", line 14, in SECRET_KEY = config('SECRET_KEY') File "C:\Python 3.6.5\lib\site-packages\decouple.py", line 197, in call return self.config(*args, **kwargs) File "C:\Python 3.6.5\lib\site-packages\decouple.py", line 85, in call__ return self.get(*args, **kwargs) File "C:\Python 3.6.5\lib\site-packages\decouple.py", line 70, in get raise UndefinedValueError('{} not found. Declare it as envvar or define a default value.'.format(option)) decouple.UndefinedValueError: SECRET_KEY not found. Declare it as envvar or define a default value.

rg3915 commented 6 years ago

@marcosjuniorpr você não rodou o comando python contrib/env_gen.py, que se encontra no README.md, e no seu caso, delete o banco db.sqlite3 e tente novamente.

marcosjuniorpr commented 6 years ago

Deu certo, valeu pela ajuda, tinha configurado no configs.py uma forma incorreta e-mail e senha.

rg3915 commented 6 years ago

@marcosjuniorpr já resolveu seu problema.