AttributeError: module 'Person' has no attribute '_meta'
It seems like `Person` does not inherit `Model`. You did not put the code for `Person` so it's just a guess. Thanks for the reply.

However, I do have Person inherit Model.

Code:
> from peewee import *
> class Person(Model):

Also tried
> import peewee
> class Person(peewee.Model):
Unable to create a table containing foreign keys due to this error. 

Code:

    import peewee
    import Person

    db = peewee.MySQLDatabase('database', user='user', passwd='')
    class Activity(peewee.Model):
    id = peewee.CharField(primary_key=True)
    userId = peewee.ForeignKeyField(model=Person)

    class Meta:
        database = db
        db_table = 'activities'

    Activity.create_table()

Error:

      Traceback (most recent call last):
      File ".../Activity.py", line 7, in <module>
      class Activity(peewee.Model):
      File "...\AppData\Local\Programs\Python\Python38-32\lib\site-packages\peewee.py", line 6128, in __new__
      cls._meta.add_field(name, field)
      File "...\AppData\Local\Programs\Python\Python38-32\lib\site-packages\peewee.py", line 5917, in add_field
      field.bind(self.model, field_name, set_attribute)
      File "...\AppData\Local\Programs\Python\Python38-32\lib\site-packages\peewee.py", line 5180, in bind self.rel_field = self.rel_model._meta.primary_key
      AttributeError: module 'Person' has no attribute '_meta'

Other tables without foreign key can be created. 

I've checked other sites for solutions but none fit my situation.

Versions:
peewee - 3.13.3
Python - 3.8.3
OS - Windows 10