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
{{ message }}
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
Traceback (most recent call last):
File "/Users/usesr/Downloads/shefcraft/venv/bin/ape", line 8, in <module>
sys.exit(cli())
File "/Users/usesr/Downloads/shefcraft/venv/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/Users/usesr/Downloads/shefcraft/venv/lib/python3.9/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/Users/usesr/Downloads/shefcraft/venv/lib/python3.9/site-packages/ape/_cli.py", line 37, in invoke
return super().invoke(ctx)
File "/Users/usesr/Downloads/shefcraft/venv/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/usesr/Downloads/shefcraft/venv/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/usesr/Downloads/shefcraft/venv/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/Users/usesr/Downloads/shefcraft/venv/lib/python3.9/site-packages/click/decorators.py", line 92, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/Users/usesr/Downloads/shefcraft/venv/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/Users/usesr/Downloads/shefcraft/venv/lib/python3.9/site-packages/ape_compile/_cli.py", line 83, in cli
contract_types = cli_ctx.project_manager.load_contracts(
File "/Users/usesr/Downloads/shefcraft/venv/lib/python3.9/site-packages/ape/managers/project/manager.py", line 668, in load_contracts
manifest = self.local_project.create_manifest(
File "/Users/usesr/Downloads/shefcraft/venv/lib/python3.9/site-packages/ape/managers/project/types.py", line 179, in create_manifest
compiled_contract_types = self._compile(project_sources)
File "/Users/usesr/Downloads/shefcraft/venv/lib/python3.9/site-packages/ape/managers/project/types.py", line 211, in _compile
return self.compiler_manager.compile(project_sources.sources_needing_compilation)
File "/Users/usesr/Downloads/shefcraft/venv/lib/python3.9/site-packages/ape/managers/compilers.py", line 148, in compile
compiled_contracts = compiler.compile(paths_to_compile, base_path=contracts_folder)
File "/Users/usesr/Downloads/shefcraft/venv/lib/python3.9/site-packages/ape_cairo/compiler.py", line 240, in compile
self.load_dependencies()
File "/Users/usesr/Downloads/shefcraft/venv/lib/python3.9/site-packages/ape_cairo/compiler.py", line 226, in load_dependencies
destination_path.write_text(source.content)
File "/Users/usesr/opt/anaconda3/lib/python3.9/pathlib.py", line 1283, in write_text
raise TypeError('data must be str, not %s' %
TypeError: data must be str, not Content
How can it be fixed?
file: ape_cairo/compiler.py", line 226, in load_dependencies
ifsource.content:
destination_path.parent.mkdir(parents=True, exist_ok=True)
destination_path.touch()
destination_path.write_text(str(source.content)) # change source.content to str(source.content)
Fill this in if you have ideas on how the bug could be fixed.
The text was updated successfully, but these errors were encountered:
vany365
changed the title
Compile error, TypeError: data must be str, not Content
Compile error, TypeError: data must be str, not Content [APE-1593]
Dec 7, 2023
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Environment information
ape
and plugin versions:What went wrong?
Please include information like:
what command you ran
ape compile
the code that caused the failure (see this link for help with formatting code)
How can it be fixed?
file: ape_cairo/compiler.py", line 226, in load_dependencies
Fill this in if you have ideas on how the bug could be fixed.
The text was updated successfully, but these errors were encountered: