ToucanToco / fastexcel

A Python wrapper around calamine
http://fastexcel.toucantoco.dev/
MIT License
120 stars 6 forks source link

Unable to import fastexcel - symbol not found in flat namespace '_PyPyBaseObject_Type' #269

Closed cmhac closed 4 months ago

cmhac commented 4 months ago

Description

Platform: M3 MacBook Pro running macOS 14.5 Python version: 3.12.4 fastexcel version: 0.11.3

Issue: I am completely unable to import fastexcel. When using a clean virtual environment, I install fastexcel using pip, then attempt to import it. When I do so, I get the error ImportError: symbol not found in flat namespace '_PyPyBaseObject_Type'. I believe this is an issue new to 0.11.3.

Steps to reproduce

1. Create a new virtual environment and install fastexcel

python3 -m venv venv
source venv/bin/activate
pip install fastexcel

2. Attempt to import fastexcel

import fastexcel

This is the error message I'm seeing:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/cmhack0114/Github/christopher-hacker/fastexcel-test/venv/lib/python3.12/site-packages/fastexcel/__init__.py", line 20, in <module>
    from ._fastexcel import (
ImportError: dlopen(/Users/cmhack0114/Github/christopher-hacker/fastexcel-test/venv/lib/python3.12/site-packages/fastexcel/_fastexcel.abi3.so, 0x0002): symbol not found in flat namespace '_PyPyBaseObject_Type'

Temporary solution

Downgrading to 0.11.2 fixed the problem for me.

danielcs88 commented 4 months ago

I ran into the same issue today

Platform: M1 MacBook Pro running macOS 14.5 Python version: 3.10.4 fastexcel version: 0.11.3

PrettyWood commented 4 months ago

Thanks for the report Yup it's due to https://github.com/ToucanToco/fastexcel/pull/265 We'll dig into it and release a 0.11.4

lukapeschke commented 4 months ago

Thanks for the report @christopher-hacker @danielcs88 , could you please try to install and run this wheel on your machine ? It's a build artifact from the linked PR. Don't worry if it's slow on big excel files, it has been build in debug mode.

You can install the wheel with the following commands

unzip wheels-macos-14-python-3.8-aarch64.zip
pip install ./fastexcel-0.11.3-cp38-abi3-macosx_11_0_arm64.whl
alexander-beedie commented 4 months ago

@lukapeschke: can 0.11.3 be yanked from pypi in the meantime?

PrettyWood commented 4 months ago

0.11.3 has already been yanked

danielcs88 commented 4 months ago

Thanks for the report @christopher-hacker @danielcs88 , could you please try to install and run this wheel on your machine ? It's a build artifact from the linked PR. Don't worry if it's slow on big excel files, it has been build in debug mode.

You can install the wheel with the following commands

unzip wheels-macos-14-python-3.8-aarch64.zip
pip install ./fastexcel-0.11.3-cp38-abi3-macosx_11_0_arm64.whl

Hey @lukapeschke, I created a test environment and can confirm the wheel you provided worked. I was able to import and test both fastexcel. It did run slower than usual, but it works!

lukapeschke commented 4 months ago

@danielcs88 glad to hear that! I'll merge the fix and provide a new release asap :)

lukapeschke commented 4 months ago

@danielcs88 fastexcel 0.11.5 is out, could you please retry with that version ?

danielcs88 commented 4 months ago

@danielcs88 fastexcel 0.11.5 is out, could you please retry with that version ?

I just updated my usual Python environment to fastexcel 0.11.5. I can confirm it works perfectly!