前提・実現したいこと
上記のサイトのgithubのコードを使って在庫管理アプリを使用したいのですが、エラーが出てしまいました。
https://github.com/retas-seven/django_app
現在の流れ
python
1!git clone https://github.com/retas-seven/django_app.git 2!pip install -r requirements.txt
この後にmanege.pyのコード内容 以下の質問で変更。
https://teratail.com/questions/364552
その後の流れになります。
--------------------------------------------------------------------------- --------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) /opt/anaconda3/lib/python3.8/logging/config.py in configure(self) 562 try: --> 563 handler = self.configure_handler(handlers[name]) 564 handler.name = name /opt/anaconda3/lib/python3.8/logging/config.py in configure_handler(self, config) 743 try: --> 744 result = factory(**kwargs) 745 except TypeError as te: /opt/anaconda3/lib/python3.8/logging/handlers.py in __init__(self, filename, when, interval, backupCount, encoding, delay, utc, atTime) 199 def __init__(self, filename, when='h', interval=1, backupCount=0, encoding=None, delay=False, utc=False, atTime=None): --> 200 BaseRotatingHandler.__init__(self, filename, 'a', encoding, delay) 201 self.when = when.upper() /opt/anaconda3/lib/python3.8/logging/handlers.py in __init__(self, filename, mode, encoding, delay) 54 """ ---> 55 logging.FileHandler.__init__(self, filename, mode, encoding, delay) 56 self.mode = mode /opt/anaconda3/lib/python3.8/logging/__init__.py in __init__(self, filename, mode, encoding, delay) 1142 else: -> 1143 StreamHandler.__init__(self, self._open()) 1144 /opt/anaconda3/lib/python3.8/logging/__init__.py in _open(self) 1171 """ -> 1172 return open(self.baseFilename, self.mode, encoding=self.encoding) 1173 FileNotFoundError: [Errno 2] No such file or directory: '/home/webims/log/application.log' The above exception was the direct cause of the following exception: ValueError Traceback (most recent call last) <ipython-input-16-abe4985f2287> in <module> 16 "forget to activate a virtual environment?" 17 ) from exc ---> 18 execute_from_command_line(sys.argv) /opt/anaconda3/lib/python3.8/site-packages/django/core/management/__init__.py in execute_from_command_line(argv) 417 """Run a ManagementUtility.""" 418 utility = ManagementUtility(argv) --> 419 utility.execute() /opt/anaconda3/lib/python3.8/site-packages/django/core/management/__init__.py in execute(self) 393 # In all other cases, django.setup() is required to succeed. 394 else: --> 395 django.setup() 396 397 self.autocomplete() /opt/anaconda3/lib/python3.8/site-packages/django/__init__.py in setup(set_prefix) 17 from django.utils.log import configure_logging 18 ---> 19 configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) 20 if set_prefix: 21 set_script_prefix( /opt/anaconda3/lib/python3.8/site-packages/django/utils/log.py in configure_logging(logging_config, logging_settings) 73 # ... then invoke it with the logging settings 74 if logging_settings: ---> 75 logging_config_func(logging_settings) 76 77 /opt/anaconda3/lib/python3.8/logging/config.py in dictConfig(config) 806 def dictConfig(config): 807 """Configure logging using a dictionary.""" --> 808 dictConfigClass(config).configure() 809 810 /opt/anaconda3/lib/python3.8/logging/config.py in configure(self) 568 deferred.append(name) 569 else: --> 570 raise ValueError('Unable to configure handler ' 571 '%r' % name) from e 572 ValueError: Unable to configure handler 'middleware_logfile_handler'
上記のerrorが出てしまいます。
お手数ですが、お力添えいただけると嬉しいです。
このアプリを使用する方法と手順を教えていただきたいです。
使用のパソコンは mac bookです。
よろしくお願いいたします。
回答2件
あなたの回答
tips
プレビュー