We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cdfa26a commit 030f52dCopy full SHA for 030f52d
1 file changed
src/canmatrix/j1939_decoder.py
@@ -1,6 +1,6 @@
1
# -*- coding: utf-8 -*-
2
from builtins import *
3
-
+import os
4
import attr
5
6
import canmatrix.formats
@@ -16,7 +16,7 @@
16
@attr.s
17
class j1939_decoder(object):
18
#string = read_binary(__name__.rpartition('.')[0], "j1939.dbc")
19
- with open( "j1939.dbc", "rb") as fd:
+ with open(os.path.join(os.path.dirname(__file__), "j1939.dbc"), "rb") as fd:
20
string = fd.read()
21
j1939_db = canmatrix.formats.loads_flat(
22
string, import_type="dbc", dbcImportEncoding="utf8"
0 commit comments