dexplo / jupyter_to_medium

Python package for publishing Jupyter Notebooks as Medium blogposts
https://dexplo.org/jupyter_to_medium
MIT License
144 stars 13 forks source link

'NoneType' object has no attribute 'find_all' #81

Closed S2Ahmad closed 11 months ago

S2Ahmad commented 11 months ago

Hi I am getting this error after clicking 'Publish'

Failed to post to Medium Returned error message below

"AttributeError: 'NoneType' object has no attribute 'find_all'

Traceback (most recent call last): File \"C:\ProgramData\anaconda3\Lib\site-packages\jupyter_to_medium\_bundler.py\", line 37, in upload data = publish(**kwargs) ^^^^^^^^^^^^^^^^^ File \"C:\ProgramData\anaconda3\Lib\site-packages\jupyter_to_medium\_publish_to_medium.py\", line 300, in publish p.main() File \"C:\ProgramData\anaconda3\Lib\site-packages\jupyter_to_medium\_publish_to_medium.py\", line 218, in main self.md, self.image_data_dict = self.create_markdown() ^^^^^^^^^^^^^^^^^^^^^^ File \"C:\ProgramData\anaconda3\Lib\site-packages\jupyter_to_medium\_publish_to_medium.py\", line 118, in create_markdown mp.preprocess(self.nb, self.resources) File \"C:\Users\s2ahm\AppData\Roaming\Python\Python311\site-packages\nbconvert\preprocessors\base.py\", line 70, in preprocess nb.cells[index], resources = self.preprocess_cell(cell, resources, index) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File \"C:\ProgramData\anaconda3\Lib\site-packages\jupyter_to_medium\_preprocesors.py\", line 119, in preprocess_cell cell['source'] = replace_md_tables(image_data_dict, cell['source'], ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File \"C:\ProgramData\anaconda3\Lib\site-packages\jupyter_to_medium\_preprocesors.py\", line 54, in replace_md_tables md_source = nptable.sub(md_table_to_image, md_source) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File \"C:\ProgramData\anaconda3\Lib\site-packages\jupyter_to_medium\_preprocesors.py\", line 48, in md_table_to_image image_data = base64.b64decode(converter(html)) ^^^^^^^^^^^^^^^ File \"C:\ProgramData\anaconda3\Lib\site-packages\jupyter_to_medium\_matplotlib_table.py\", line 247, in run self.rows, self.num_header_rows = self.parse_html(html) ^^^^^^^^^^^^^^^^^^^^^ File \"C:\ProgramData\anaconda3\Lib\site-packages\jupyter_to_medium\_matplotlib_table.py\", line 32, in parse_html rows, num_header_rows = self.parse_into_rows(html) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File \"C:\ProgramData\anaconda3\Lib\site-packages\jupyter_to_medium\_matplotlib_table.py\", line 88, in parse_into_rows num_cols = sum(int(el.get('colspan', 1)) for el in soup.find('tr').find_all(['td', 'th'])) ^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'find_all' "

S2Ahmad commented 11 months ago

nvm I reinstalled anaconda and it is working now