You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this worked in 2.x and even 3.4.. but in python 3.5...
TypeError: join() argument must be str or bytes, not 'tuple'
in 2.7
os.path.join( ['a', 'b'] )
['a', 'b']
Python 3.5.1+ (default, Mar 30 2016, 22:46:26)
[GCC 5.3.1 20160330] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.path.join( ['a', 'b'] )
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/veyepar/venvs/veyepar/lib/python3.5/posixpath.py", line 89, in join
genericpath._check_arg_types('join', a, *p)
File "/home/veyepar/venvs/veyepar/lib/python3.5/genericpath.py", line 143, in _check_arg_types
(funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'list'
>>> os.path.join( ['a'] )
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/veyepar/venvs/veyepar/lib/python3.5/posixpath.py", line 89, in join
genericpath._check_arg_types('join', a, *p)
File "/home/veyepar/venvs/veyepar/lib/python3.5/genericpath.py", line 143, in _check_arg_types
(funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'list'
>>>
It appears you are on Linux (Ubuntu?) but it could be an apple. So tell
me what version of python, wxpython and platform. But you did not have
to use the designer - right?
Johnf
On 8/31/20 1:05 PM, Carl Karsten wrote:
Here is what I did to get the a pdf:
|self.HomeDirectory = os.path.join(os.path.split(val)[:-1])[0]
https://github.com/dabodev/dabo/blob/master/dabo/lib/reportWriter.py#L3149
os.path.split(val)[:-1])[0] / [0/) bug #25 dabo/lib/reportWriter.py
-import dabo.dConstants as kons / +from dabo import dConstants as kons
dabo/biz/dBizobj.py Image / Pill.Image dabo/biz/dBizobj.py repalce
spaces with tab dabo/lib/reportWriter.py # del k, v, Decimal
dabo/db/__init__.py buffer/bytes dabo/db/__init__.py
translation.ugettext / translation.gettext dabo/dLocalize.py -from .
import locale/ +import locale dabo/__init__.py uppercase /
ascii_uppercase dabo/lib/propertyHelperMixin.py new.instancemethod /
types.MethodType 2to3 |
Did all this to my master branch.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#25 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYRP57GEIMDQUL2ZU2F2VLSDP7CHANCNFSM4CICK5PA>.
I am guessing this is using some undocumented behaviour:
self.HomeDirectory = os.path.join(os.path.split(val)[:-1])[0]
https://github.com/dabodev/dabo/blob/master/dabo/lib/reportWriter.py#L3149
this worked in 2.x and even 3.4.. but in python 3.5...
in 2.7
A simple fix is to move the [0] :
The text was updated successfully, but these errors were encountered: