Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

299
Views
iPyKernel throwing "TypeError: object NoneType can't be used in 'await' expression"

I know that several similar questions exist on this topic, but to my knowledge all of them concern an async code (wrongly) written by the user, while in my case it comes from a Python package.

I have a Jupyter notebook whose first cell is

! pip install numpy
! pip install pandas

and I want to automatically play the notebook using Papermill. No problem on my local machine (Windows 11 with Python 3.7): I install iPyKernel and Papermill and everything is fine.

The problem is when I try to do the same on my BitBucket pipeline (Python image 3-alpine, but it happens under different others); the first cell throws the following error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/ipykernel/kernelbase.py", line 461, in dispatch_queue
    await self.process_one()
  File "/usr/local/lib/python3.7/site-packages/ipykernel/kernelbase.py", line 450, in process_one
    await dispatch(*args)
TypeError: object NoneType can't be used in 'await' expression

that makes the script stop at the 2nd cell, where I import numpy.

If it can be relevant, I've "papermilled" under the GitLab CI without any problem in the past.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Seems to be a bug in ipykernel 6.9.0 - options that worked for me:

  • upgrade to 6.9.1 (latest version as of 2022-02-22); e.g. via pip install ipykernel --upgrade
  • downgrade to 6.8.0 (if upgrading messes with other dependencies you might have); e.g. via pip install ipykernel==6.8.0
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!