Porting to python3

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Porting to python3

Post by looo »

ebrahim raeyat wrote: Sun Nov 04, 2018 12:17 am 2- dxf library: when i want to export to dxf it gives me this error:
What versions of FreeCAD are you using? I guess this problem shouldn't be there in recent versions as we test for syntax errors for every pull-request. If you using conda directly please try upding with:

Code: Select all

conda update freecad -c conda-forge -c freecad/lable/dev
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Porting to python3

Post by looo »

ok, the problem is related to an add-on and not freecad itself. Please update the dxf-library. Most-likely you are using an old version of this library.

To do so:
- start FreeCAD
- tools->addon-manager
- select dxf-library and click on install/update
- close and restart FreeCAD
weimens
Posts: 1
Joined: Tue Oct 23, 2018 5:44 pm

Re: Porting to python3

Post by weimens »

ebrahim raeyat wrote: Sun Nov 04, 2018 12:17 am 1- axis numbering format act on first bubble when choosing "A, B, C" format.
i just created a pull request https://github.com/FreeCAD/FreeCAD/pull/1775 to fix this problem, so in one of the next appimages it should work.
User avatar
ebrahim raeyat
Posts: 625
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: Porting to python3

Post by ebrahim raeyat »

looo wrote: Sun Nov 04, 2018 8:58 am

Code: Select all

conda update freecad -c conda-forge -c freecad/lable/dev
yes, i have conda distribution. I ran this command and give this error:

Code: Select all

(fc_test) [ebi@manjaro bin]$ ./conda update freecad -c conda-forge -c freecad/lable/dev
Solving environment: failed

CondaHTTPError: HTTP 404 NOT FOUND for url <https://conda.anaconda.org/freecad/lable/dev/noarch/repodata.json>
Elapsed: 00:00.282347
CF-RAY: 47491d0b7e28274a-FRA

The remote server could not find the noarch directory for the
requested channel with url: https://conda.anaconda.org/freecad/lable/dev

As of conda 4.3, a valid channel must contain a `noarch/repodata.json` and
associated `noarch/repodata.json.bz2` file, even if `noarch/repodata.json` is
empty. please request that the channel administrator create
`noarch/repodata.json` and associated `noarch/repodata.json.bz2` files.
$ mkdir noarch
$ echo '{}' > noarch/repodata.json
$ bzip2 -k noarch/repodata.json

You will need to adjust your conda configuration to proceed.
Use `conda config --show channels` to view your configuration's current state.
Further configuration help can be found at <https://conda.io/docs/config.html>.
from this i also run this command but give same error:

Code: Select all

./conda update  -c freecad/lable/dev freecad
thanks.
User avatar
ebrahim raeyat
Posts: 625
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: Porting to python3

Post by ebrahim raeyat »

looo wrote: Sun Nov 04, 2018 11:26 am ok, the problem is related to an add-on and not freecad itself. Please update the dxf-library. Most-likely you are using an old version of this library.

To do so:
- start FreeCAD
- tools->addon-manager
- select dxf-library and click on install/update
- close and restart FreeCAD
I update dxf library but it gives me same error.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Porting to python3

Post by looo »

ebrahim raeyat wrote: Sun Nov 04, 2018 6:35 pm yes, i have conda distribution. I ran this command and give this error:
sorry there was a typo. This should work:

Code: Select all

conda update freecad -c conda-forge -c freecad/label/dev
ebrahim raeyat wrote: Sun Nov 04, 2018 6:37 pm I update dxf library but it gives me same error.
strange, it's definetly fixed in the current master on github: https://github.com/yorikvanhavre/Draft- ... bb81910R88
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Porting to python3

Post by looo »

weimens wrote: Sun Nov 04, 2018 3:37 pm
ebrahim raeyat wrote: Sun Nov 04, 2018 12:17 am 1- axis numbering format act on first bubble when choosing "A, B, C" format.
i just created a pull request https://github.com/FreeCAD/FreeCAD/pull/1775 to fix this problem, so in one of the next appimages it should work.
Thanks for this contribution!
User avatar
ebrahim raeyat
Posts: 625
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: Porting to python3

Post by ebrahim raeyat »

weimens wrote: Sun Nov 04, 2018 3:37 pm
ebrahim raeyat wrote: Sun Nov 04, 2018 12:17 am 1- axis numbering format act on first bubble when choosing "A, B, C" format.
i just created a pull request https://github.com/FreeCAD/FreeCAD/pull/1775 to fix this problem, so in one of the next appimages it should work.
I can't find issues to create one. how can i create an issue?

when i want to show labels gives me this error due to unicode:

Code: Select all

Traceback (most recent call last):
  File "/home/ebi/miniconda3/envs/fc_test/Mod/Arch/ArchAxis.py", line 399, in updateData
    self.onChanged(obj.ViewObject,"ShowLabel")
  File "/home/ebi/miniconda3/envs/fc_test/Mod/Arch/ArchAxis.py", line 545, in onChanged
    if isinstance(t,unicode):
<class 'NameError'>: name 'unicode' is not defined
another question. what is customNumbering at all? how it works. I can't underestand.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Porting to python3

Post by triplus »

weimens wrote: Sun Nov 04, 2018 3:37 pm
ebrahim raeyat wrote: Sun Nov 04, 2018 12:17 am 1- axis numbering format act on first bubble when choosing "A, B, C" format.
i just created a pull request https://github.com/FreeCAD/FreeCAD/pull/1775 to fix this problem, so in one of the next appimages it should work.
Thanks.

P.S. And welcome to the FreeCAD community.
ebrahim raeyat wrote: Sun Nov 04, 2018 7:49 pm another question. what is customNumbering at all? how it works. I can't underestand.
Likely best if you open a dedicated thread and ask.

P.S. And thanks for reporting Py3 related issues.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Porting to python3

Post by looo »

thanks for reporting. I guess there is not much we can do about this. Most likely this problems are related to changes microsoft made to their system...
Post Reply