You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I posting this because I am encountering difficulties while attempting to import the gmeep library for a scattering parameter simulation using Gdsfactory and Meep.
I have included the relevant code snippet below:
import gdsfactory as gf
import matplotlib.pyplot as plt
import numpy as np
from autograd import tensor_jacobian_product
from gdsfactory.generic_tech import get_generic_pdk
from meep import MaterialGrid, Medium, Vector3, Volume
from meep.adjoint import (
DesignRegion,
get_conic_radius_from_eta_e,
)
import gplugins
import gplugins.gmeep as gm
gf.config.rich_output()
PDK = get_generic_pdk()
PDK.activate()
The issue arises during the import statement: there seems to be a recursive call here.
----> [2] import gplugins.gmeep as gm
---> [18] from gplugins.gmeep.write_sparameters_grating import (
[19] write_sparameters_grating,
[20] write_sparameters_grating_batch,
[21] write_sparameters_grating_mpi,
[22])
PydanticSchemaGenerationError: Unable to generate pydantic-core schema for <class 'kfactory.kcell.KCell'>. Set `arbitrary_types_allowed=True` in the model_config to ignore this error or implement `__get_pydantic_core_schema__` on your type to fully support it.
If you got this error by calling handler(<some type>) within `__get_pydantic_core_schema__` then you likely need to call `handler.generate_schema(<some type>)` since we do not call `__get_pydantic_core_schema__` on `<some type>` otherwise to avoid infinite recursion
I am unable to successfully import the gmeep library. I would greatly appreciate any suggestions or guidance you could offer to resolve this import error.
Thank you for your time and assistance.
The text was updated successfully, but these errors were encountered:
joreb
changed the title
unable to import gmeep to
unable to import gmeep
Jul 12, 2024
Dear Sir ,
I posting this because I am encountering difficulties while attempting to import the gmeep library for a scattering parameter simulation using Gdsfactory and Meep.
I have included the relevant code snippet below:
The issue arises during the import statement: there seems to be a recursive call here.
I am unable to successfully import the gmeep library. I would greatly appreciate any suggestions or guidance you could offer to resolve this import error.
Thank you for your time and assistance.
The text was updated successfully, but these errors were encountered: