1

and i am building a web crawler for personal use.

Here is the Spider file

scrapySpider

Here is the model file

model

Here is the pipe line

pipeline

My database settings are

DATABASE = {'drivername': 'mysql+mysqldb',
        'host': 'localhost',
        'port': '3306',
        'username': 'user', # fill in your username here
        'password': 'pass', # fill in your password here
        'database': 'scrapydb'}

But i am getting this error

  .............., line 19, in process_item
  vehicle = vehicles(**item)
  exceptions.TypeError: vehicles() got an unexpected keyword argument 'odometer'

I've tried many things but was unsuccessful. Please help!

1 Answer 1

1

vehicles should be a class, not a function:

class vehicles(DeclarativeBase):
    ...
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.