Issue with Building Wheel for pycg (Error: KeyError: 'text')

I am encountering an issue while attempting to install the pycg package with 0.0.7 version. The error is related to building the wheel and seems to be originating from a subprocess. The key error (KeyError: 'text' ) indicates a problem with the license field in the pyproject.toml file.

Description: I am encountering an issue while attempting to install the pycg package. The error is related to building the wheel and seems to be originating from a subprocess. The key error (KeyError: 'text') indicates a problem with the license field in the pyproject.toml file.

...
KeyError: 'text'
...

Error Context:

  • The warning mentions the usage of deprecated options and suggests updating the project by 2024-Sep-26.
  • Specific issues are raised for fields like license, authors, classifiers, and scripts that need to be listed as dynamic in pyproject.toml to prevent problems.

Request for Assistance: I would appreciate guidance on resolving the KeyError: 'text' issue and any additional steps needed to ensure compatibility with the latest packaging specifications.

Environment Information:

  • Python Version: 3.9
  • Pip Version: 22.0.3
  • PyCG Version: 0.0.7

Note: This error seems specific to the pycg package, and any insights or solutions from the community would be highly valuable though pycg with 0.0.6 is working fine but it’s not working with 0.0.7. Thank you in advance for your assistance!

Welcome to the community, @sumit_tagadiya! :hugs:

To address your issue with installing pycg version 0.0.7, you should focus on configuring the license field in the pyproject.toml file.

Here’s a suggested snippet:

[tool.poetry]
name = "pycg"
version = "0.0.7"
description = ""
license = "MIT"  # Replace with the appropriate license

Ensure the license information is accurately specified.

Comparing the pyproject.toml file from version 0.0.6 to 0.0.7 may also help identify any problematic changes.

Let me know if that helps. If not, we’ll explore other options.

Best,
Charly

Hi @Charly_Wargnier ,

Thanks for your response. I appreciate your guidance.

However, I’m not quite familiar with configuring the license field in the pyproject.toml file. Could you provide a bit more detail or a step-by-step guide on how to do this?

Additionally, I’d like to mention that the packages are being installed directly from the requirements.txt file from Github private repository. So how can i configure above things?

Your assistance is greatly valued.

Best,
Sumit Tagadiya

pycg==0.0.7 is broken

pycg==0.0.6 should do the job

1 Like

Hi @Franky1 ,

I hope you’re doing well. I encountered a peculiar issue with pycg version 0.0.7. Surprisingly, it’s working flawlessly on my local machine, and it was running fine on Streamlit Cloud until yesterday (November 22, 2023). However, yesterday evening it suddenly stopped working and is throwing an installation error.

Strangely, version 0.0.6 works perfectly fine on Streamlit. Do you have any insights or suggestions on why this sudden change might have occurred?

Any help or guidance would be greatly appreciated!

Best,
Sumit Tagadiya

Issue was fixed by the maintainer and a new version was released, therefore this should work now:

pycg==0.0.8

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.