question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'NoneType' object has no attribute '_source_type'

See original GitHub issue

Poetry 1.1.4 on Debian sid and Ubuntu 20.10:

  • poetry init
  • poetry add pyyaml==5.3.1 -vvv
  AttributeError

  'NoneType' object has no attribute '_source_type'

  at ~/.local/lib/python3.8/site-packages/poetry/inspection/info.py:548 in from_directory
      544│                         raise
      545│ 
      546│                     # we discovered PkgInfo but no requirements were listed
      547│ 
    → 548│         info._source_type = "directory"
      549│         info._source_url = path.as_posix()
      550│ 
      551│         return info
      552│ 

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:27 (12 by maintainers)

github_iconTop GitHub Comments

3reactions
hansharhoffcommented, Oct 4, 2021

Be aware that this bug is still present in the current release version of poetry (1.1.10). Fix is in master branch but has not been released yet.

If you hit the issue you can manually upgrade pkginfo to latest version with e.g.

pip install --upgrade pkginfo

Fix line in master

1reaction
grunscommented, Feb 24, 2021

confirming this fix: upgrading from pkginfo==1.4.2 to pkginfo==1.7.0 fixes the problem

Resolving dependencies... (5.5s)

  AttributeError

  'NoneType' object has no attribute '_source_type'

  at /usr/local/lib/python3.6/dist-packages/poetry/inspection/info.py:548 in from_directory
      544│                         raise
      545│ 
      546│                     # we discovered PkgInfo but no requirements were listed
      547│ 
    → 548│         info._source_type = "directory"
      549│         info._source_url = path.as_posix()
      550│ 
      551│         return info
      552│ 

with poetry v1.1.4

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - 'NoneType' object has no attribute 'source' error while ...
I wrote a custom template tag that checks if a particular group on a site is bookmarked by a user and adds specific...
Read more >
Why do I get AttributeError: 'NoneType' object has no attribute ...
1 Answer. You are getting AttributeError: 'NoneType' object has no attribute 'something' because NoneType means that instead of an instance of whatever Class...
Read more >
Nonetype' object has no attribute 'decode' error when i upload ...
I am new to ionic4/angular4.i need to upload the profile pic to database.i wrote code but I don't know whether it is correct...
Read more >
nonetype' object has no attribute 'create_execution_context' site
AttributeError : 'NoneType' object has no attribute ... NoneType means that instead of an instance of whatever Class or Object you think you're...
Read more >
How To Fix Attribute Error: 'NoneType' Object Has ... - YouTube
Article Link: https://blog.finxter.com/how-to-fix-error- nonetype - object - has - no - attribute -group/ Email Academy: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found