Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAT (and potentially other) import errors in 1.0.0RC1 #86

Open
g3grau opened this issue Sep 16, 2024 · 2 comments
Open

SAT (and potentially other) import errors in 1.0.0RC1 #86

g3grau opened this issue Sep 16, 2024 · 2 comments
Assignees
Labels
bug Fixed Issue is fixed

Comments

@g3grau
Copy link

g3grau commented Sep 16, 2024

Hi,

the upcoming FC 1.0.0 moved to Python 3.11 where the import (e.g. of a SAT file) fails on open(..., 'rU') because the deprecated opion U has been removed. The fix should be simply to remove the U from all file open commands. Read() should handle both UNIX and DOS line styles.

10:04:40  Importing: /home/ggrau/Downloads/M-QFN48W.4.sat
10:04:40  pyException: Traceback (most recent call last):
  File "<string>", line 5, in <module>
  File "/home/ggrau/.local/share/FreeCAD/Mod/InventorLoader/./importerIL.py", line 113, in insert
    reader = read(filename)
             ^^^^^^^^^^^^^^
  File "/home/ggrau/.local/share/FreeCAD/Mod/InventorLoader/./importerIL.py", line 46, in read
    if (importerSAT.readText(filename)):
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ggrau/.local/share/FreeCAD/Mod/InventorLoader/./importerSAT.py", line 160, in readText
    with open(fileName, 'rU') as file:
         ^^^^^^^^^^^^^^^^^^^^
<class 'ValueError'>: invalid mode: 'rU'

thanks & BR
Guenter

@jmplonka jmplonka self-assigned this Dec 5, 2024
@jmplonka
Copy link
Owner

jmplonka commented Dec 5, 2024

Could you please share an example (link?)... Would be helpful to speed up bug-fixing.

@jmplonka
Copy link
Owner

seems to be a general issue...

@jmplonka jmplonka added the bug label Dec 12, 2024
jmplonka added a commit that referenced this issue Dec 12, 2024
@jmplonka jmplonka added the Fixed Issue is fixed label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixed Issue is fixed
Projects
None yet
Development

No branches or pull requests

2 participants