任何人都知道如何解决这个问题?来自控制台的堆栈跟踪,执行后报告错误:
InstaPy Version: 0.6.9
._. ._. ._. ._. ._. ._. ._. ._. ._.
Workspace in use: "/home/zanettra/InstaPy"
Error, unable to determine correct filename for 64bit linux
Traceback (most recent call last):
File "unfollow.py", line 24, in <module>
headless_browser=False)
File "/usr/local/lib/python3.6/dist-packages/instapy/instapy.py", line
322, in __init__
self.logger,
File "/usr/local/lib/python3.6/dist-packages/instapy/browser.py", line 114, in set_selenium_local_session
driver_path = geckodriver_path or get_geckodriver()
File "/usr/local/lib/python3.6/dist-packages/instapy/browser.py", line 36, in get_geckodriver
sym_path = gdd.download_and_install()[1]
File "/usr/local/lib/python3.6/dist-packages/webdriverdownloader/webdriverdownloader.py", line 177, in download_and_install
show_progress_bar=show_progress_bar)
File "/usr/local/lib/python3.6/dist-packages/webdriverdownloader/webdriverdownloader.py", line 129, in download
download_url = …Run Code Online (Sandbox Code Playgroud) 这是我的 docker-compose.yml 我试图在我的本地项目上运行 cypress,但它拒绝在端口上运行。我做错了什么?
version: '3.2'
# run Cypress tests and exit with command
# docker-compose up --exit-code-from cypress
services:
cypress:
# the Docker image to use from https://github.com/cypress-io/cypress-docker-images
image: "cypress/included:5.0.0"
environment:
- CYPRESS_baseUrl=http://localhost:3000
# share the current folder as volume to avoid copying
working_dir: /e2e
command: "--browser chrome"
ports:
- 3333:3000
volumes:
- ./:/e2e
Run Code Online (Sandbox Code Playgroud)
compose-docker 的结果:
cypress_1 |
cypress_1 | Cypress automatically waits until your server is accessible before running tests.
cypress_1 |
cypress_1 | We will try connecting …Run Code Online (Sandbox Code Playgroud) 编辑:仍然有这个问题。
Visual Studio Code 抛出以下错误:
User model imported from django.contrib.models
该错误出现在以下脚本 ( models.py) 的第 2 行中。该代码来自 Django 教程,运行良好。但令人烦恼的是 Visual Studio Code ( Pylint ) 会抛出错误(并将脚本标记为红色)。
from django.db import models
from django.contrib.auth.models import User
from django.utils import timezone
# Create your models here.
class Post(models.Model):
title = models.CharField(max_length=100)
content = models.TextField()
date_posted = models.DateTimeField(default=timezone.now)
author = models.ForeignKey(User, on_delete=models.CASCADE)
def __str__(self):
return self.title
Run Code Online (Sandbox Code Playgroud)
此外,VSC 在导入自定义模型时会引发错误,例如Post.
from app_blog.models import Post。
错误:无法导入“app_blog.models”
我的设置: