Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to run "Imports and definitions" #32

Open
drowld opened this issue Mar 24, 2024 · 0 comments
Open

Error when trying to run "Imports and definitions" #32

drowld opened this issue Mar 24, 2024 · 0 comments

Comments

@drowld
Copy link

drowld commented Mar 24, 2024

I've got this error

`ModuleNotFoundError Traceback (most recent call last)
in <cell line: 12>()
10 import gc
11
---> 12 from diffusion import sampling
13 import torch
14 from torch import optim, nn

ModuleNotFoundError: No module named 'diffusion'`

I tried manually installing diffusion by doing
!pip install diffusion

but then get
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
jsonschema 4.19.2 requires attrs>=22.2.0, but you have attrs 21.4.0 which is incompatible.
referencing 0.34.0 requires attrs>=22.2.0, but you have attrs 21.4.0 which is incompatible.
Successfully installed attrs-21.4.0 cbor2-5.6.2 diffusion-6.10.2 diffusion-core-0.0.65 stringcase-1.2.0 structlog-21.5.0
WARNING: The following packages were previously imported in this runtime:
[attr,attrs]
You must restart the runtime in order to use newly installed versions.

and together with it i get

`TypeError Traceback (most recent call last)
in <cell line: 3>()
1 #@title Imports and definitions
2 get_ipython().system('pip install diffusion')
----> 3 from prefigure.prefigure import get_all_args
4 from contextlib import contextmanager
5 from copy import deepcopy

26 frames
/usr/local/lib/python3.10/dist-packages/prefigure/init.py in
1 from .prefigure import *
----> 2 from .ofc import *

/usr/local/lib/python3.10/dist-packages/prefigure/ofc.py in
10 from prefigure import get_all_args, arg_eval
11 import configparser
---> 12 import gradio as gr
13 import gradio.blocks as gb
14 import itertools

/usr/local/lib/python3.10/dist-packages/gradio/init.py in
1 import json
2
----> 3 import gradio._simple_templates
4 import gradio.image_utils
5 import gradio.processing_utils

/usr/local/lib/python3.10/dist-packages/gradio/_simple_templates/init.py in
----> 1 from .simpledropdown import SimpleDropdown
2 from .simpleimage import SimpleImage
3 from .simpletextbox import SimpleTextbox
4
5 all = ["SimpleDropdown", "SimpleTextbox", "SimpleImage"]

/usr/local/lib/python3.10/dist-packages/gradio/_simple_templates/simpledropdown.py in
4 from typing import Any, Callable
5
----> 6 from gradio.components.base import FormComponent
7 from gradio.events import Events
8

/usr/local/lib/python3.10/dist-packages/gradio/components/init.py in
1 from gradio.components.annotated_image import AnnotatedImage
2 from gradio.components.audio import Audio
----> 3 from gradio.components.bar_plot import BarPlot
4 from gradio.components.base import (
5 Component,

/usr/local/lib/python3.10/dist-packages/gradio/components/bar_plot.py in
5 from typing import Any, Callable, Literal
6
----> 7 import altair as alt
8 import pandas as pd
9 from gradio_client.documentation import document

/usr/local/lib/python3.10/dist-packages/altair/init.py in
2 version = "4.2.2"
3
----> 4 from .vegalite import *
5 from . import examples
6

/usr/local/lib/python3.10/dist-packages/altair/vegalite/init.py in
1 # flake8: noqa
----> 2 from .v4 import *

/usr/lib/python3.10/importlib/_bootstrap.py in find_and_load(name, import)

/usr/lib/python3.10/importlib/_bootstrap.py in find_and_load_unlocked(name, import)

/usr/lib/python3.10/importlib/_bootstrap.py in _load_unlocked(spec)

/usr/lib/python3.10/importlib/_bootstrap.py in _load_backward_compatible(spec)

/usr/local/lib/python3.10/dist-packages/google/colab/_import_hooks/_altair.py in load_module(self, fullname)
36 """Loads Altair normally and runs pre-initialization code."""
37 previously_loaded = fullname in sys.modules
---> 38 altair_module = imp.load_module(fullname, *self.module_info)
39
40 if not previously_loaded:

/usr/lib/python3.10/imp.py in load_module(name, file, filename, details)
243 return load_dynamic(name, filename, file)
244 elif type_ == PKG_DIRECTORY:
--> 245 return load_package(name, filename)
246 elif type_ == C_BUILTIN:
247 return init_builtin(name)

/usr/lib/python3.10/imp.py in load_package(name, path)
215 return _exec(spec, sys.modules[name])
216 else:
--> 217 return _load(spec)
218
219

/usr/local/lib/python3.10/dist-packages/altair/vegalite/v4/init.py in
1 # flake8: noqa
----> 2 from .schema import *
3 from .api import *
4
5 from ...datasets import list_datasets, load_dataset

/usr/local/lib/python3.10/dist-packages/altair/vegalite/v4/schema/init.py in
1 # flake8: noqa
----> 2 from .core import *
3 from .channels import *
4 SCHEMA_VERSION = 'v4.17.0'
5 SCHEMA_URL = 'https://vega.github.io/schema/vega-lite/v4.17.0.json'

/usr/local/lib/python3.10/dist-packages/altair/vegalite/v4/schema/core.py in
2 # tools/generate_schema_wrapper.py. Do not modify directly.
3
----> 4 from altair.utils.schemapi import SchemaBase, Undefined, _subclasses
5
6 import pkgutil

/usr/local/lib/python3.10/dist-packages/altair/utils/init.py in
----> 1 from .core import (
2 infer_vegalite_type,
3 infer_encoding_types,
4 sanitize_dataframe,
5 parse_shorthand,

/usr/local/lib/python3.10/dist-packages/altair/utils/core.py in
11 import warnings
12
---> 13 import jsonschema
14 import pandas as pd
15 import numpy as np

/usr/local/lib/python3.10/dist-packages/jsonschema/init.py in
11 import warnings
12
---> 13 from jsonschema._format import FormatChecker
14 from jsonschema._types import TypeChecker
15 from jsonschema.exceptions import SchemaError, ValidationError

/usr/local/lib/python3.10/dist-packages/jsonschema/_format.py in
9 import warnings
10
---> 11 from jsonschema.exceptions import FormatError
12
13 _FormatCheckCallable = typing.Callable[[object], bool]

/usr/local/lib/python3.10/dist-packages/jsonschema/exceptions.py in
13
14 from attrs import define
---> 15 from referencing.exceptions import Unresolvable as _Unresolvable
16
17 from jsonschema import _utils

/usr/local/lib/python3.10/dist-packages/referencing/init.py in
3 """
4
----> 5 from referencing._core import Anchor, Registry, Resource, Specification
6
7 all = ["Anchor", "Registry", "Resource", "Specification"]

/usr/local/lib/python3.10/dist-packages/referencing/_core.py in
84
85 @Frozen
---> 86 class Specification(Generic[D]):
87 """
88 A specification which defines referencing behavior.

/usr/local/lib/python3.10/dist-packages/referencing/_core.py in Specification()
110 [Specification[D], D],
111 Iterable[AnchorType[D]],
--> 112 ] = field(alias="anchors_in")
113
114 #: An opaque specification where resources have no subresources

TypeError: field() got an unexpected keyword argument 'alias'`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant