Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8531315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:27:21+00:00 2026-06-11T09:27:21+00:00

I opened a picture with PIL, but when I tried to use split() to

  • 0

I opened a picture with PIL, but when I tried to use split() to split the channels I got following error:
AttributeError: 'NoneType' object has no attribute 'bands'

import Image
img = Image.open('IMG_0007.jpg')

img.split()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)

/home/blum/<ipython console> in <module>()

/usr/lib/python2.6/dist-packages/PIL/Image.pyc in split(self)
   1495         "Split image into bands"
   1496 
-> 1497         if self.im.bands == 1:
   1498             ims = [self.copy()]
   1499         else:

AttributeError: 'NoneType' object has no attribute 'bands'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T09:27:22+00:00Added an answer on June 11, 2026 at 9:27 am

    With googling I found this comment on SO, stating that PIL is sometimes ‘lazy’ and ‘forgets’ to load after opening. So you have to do it like this:

    import Image
    img = Image.open('IMG_0007.jpg')
    img.load()
    img.split()
    

    Please +1 also the original comment! This person did the real work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My app is screen_orientation_portrait,but when I opened camera,the picture in my camera is 90degreed
I opened up a huge Solution in VS2008. I has about a little over
i have opened fancy box with following code $(#tip5).fancybox({ 'width': 400, 'height': 370, 'enableEscapeButton'
I have opened one file with following way: fp = fopen(some.txt,r); Now in this
I have an advent/christmas calendar. Everyday is another picture with one more door opened.
How can be done - hompeage which is a room picture, but with interactive
I got curious what my binary iphone files contained, so I opened some in
I have opened this webpage in all browsers, but none of them display the
I Opened/Created a new Word document dynamically on FormLoad using: using Word = Microsoft.Office.Interop.Word;
I opened *.htm file with Excel Application ( Microsoft.Office.Interop.Excel ). It was parsed excellent!

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.