Шурок
Питонисты - можете подсказать - как пофиксить
sqlalchemy
class Person(Base):
__tablename__ = 'myUser'
id = Column(Integer, primary_key=True)
name = Column(String(16))
def __init__(self, id, name):
self.name = name
self.id = id
def selectUser():
session = session_factory()
stmt = select(Person).where(Person.id == '99')
result = session.execute(stmt)
print(result)
session.close()
падаю с ошибкой
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/sql/selectable.py", line 3114, in init
for c in columns:
TypeError: 'DeclarativeMeta' object is not iterable
Гугл чет нихера не подсказывает
У меня никаких связей нету - чисто 1 таблица
vladislav
Ваш ответ, сударь, порождает очень большое желание Вам помогать (не-а).
Моделируем ситуацию, у меня какой-то косяк в коде - я в душе не вкурсе че делать.
Мне предлагают вариант, но он хуйнэ.
Отвечаю что, спасибо, но не подходит потому что "вставить фразу".
Лично мне по этой части кода и ошибке не понятно что именно там не так.
misn
C:\Users\lazar>python C:\Users\lazar\Desktop\v1\main.py
Traceback (most recent call last):
File "C:\Users\lazar\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\common\service.py", line 71, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "C:\Users\lazar\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\lazar\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] Не удается найти указанный файл
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\lazar\Desktop\v1\main.py", line 49, in <module>
serch()
File "C:\Users\lazar\Desktop\v1\main.py", line 36, in serch
driver = webdriver.Chrome(service=Service("chromedriver.exe"))
File "C:\Users\lazar\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 70, in init
super(WebDriver, self).init(DesiredCapabilities.CHROME['browserName'], "goog",
File "C:\Users\lazar\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 89, in init
self.service.start()
File "C:\Users\lazar\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\common\service.py", line 81, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver.exe' executable needs to be in PATH. Please see https://chromedriver.chromium.org/home