Can't make on mac

18 views
Skip to first unread message

Tennessee Leeuwenburg

unread,
Oct 1, 2012, 7:14:12 PM10/1/12
to pyj...@googlegroups.com
Hi, I just tried to get this working, first time user. Fell at first hurdle, couldn't make. The message didn't give me any clues, so I thought I would just post it here. Fresh git checkout, commit ID 9794e6cfa7ed90b809c587a63b078efbe3dacf29.

(py)skaro-2:pyjaco tleeuwenburg$ make
make -C examples generate
Compiling [ui.py]
Traceback (most recent call last):
  File "ui.py", line 309, in <module>
    main()
  File "ui.py", line 286, in main
    js = pyjaco.compile_string(source)
  File "/Users/tleeuwenburg/Development/pyjaco/pyjaco/__init__.py", line 51, in compile_string
    comp.append_string(script)
  File "/Users/tleeuwenburg/Development/pyjaco/pyjaco/__init__.py", line 146, in append_string
    self.buffer.write("\n".join(self.compiler.visit(ast.parse(code))))
  File "/Users/tleeuwenburg/Development/pyjaco/pyjaco/compiler/multiplexer.py", line 103, in visit
    res = getattr(self, name)(node)
  File "/Users/tleeuwenburg/Development/pyjaco/pyjaco/compiler/__init__.py", line 205, in visit_Module
    module.extend(self.visit(stmt))
  File "/Users/tleeuwenburg/Development/pyjaco/pyjaco/compiler/multiplexer.py", line 105, in visit
    res = self.visit_current(node)
  File "/Users/tleeuwenburg/Development/pyjaco/pyjaco/compiler/__init__.py", line 155, in visit
    return visitor(node)
  File "/Users/tleeuwenburg/Development/pyjaco/pyjaco/compiler/python.py", line 258, in visit_ClassDef
    js.append("%s.PY$%s = %s;" % (heirar, stmt.name, "\n".join(self.visit(stmt))))
  File "/Users/tleeuwenburg/Development/pyjaco/pyjaco/compiler/multiplexer.py", line 103, in visit
    res = getattr(self, name)(node)
  File "/Users/tleeuwenburg/Development/pyjaco/pyjaco/compiler/multiplexer.py", line 162, in visit_FunctionDef
    res = self.visit(node, False)
  File "/Users/tleeuwenburg/Development/pyjaco/pyjaco/compiler/multiplexer.py", line 105, in visit
    res = self.visit_current(node)
  File "/Users/tleeuwenburg/Development/pyjaco/pyjaco/compiler/__init__.py", line 155, in visit
    return visitor(node)
  File "/Users/tleeuwenburg/Development/pyjaco/pyjaco/compiler/python.py", line 206, in visit_FunctionDef
    js.extend(self.indent(self.visit(stmt)))
  File "/Users/tleeuwenburg/Development/pyjaco/pyjaco/compiler/multiplexer.py", line 103, in visit
    res = getattr(self, name)(node)
  File "/Users/tleeuwenburg/Development/pyjaco/pyjaco/compiler/multiplexer.py", line 145, in visit_Assign
    return self.visit(node, False)
  File "/Users/tleeuwenburg/Development/pyjaco/pyjaco/compiler/multiplexer.py", line 105, in visit
    res = self.visit_current(node)
  File "/Users/tleeuwenburg/Development/pyjaco/pyjaco/compiler/__init__.py", line 155, in visit
    return visitor(node)
  File "/Users/tleeuwenburg/Development/pyjaco/pyjaco/compiler/__init__.py", line 189, in visit_Assign
    return self.visit_AssignSimple(node.targets[0], self.visit(node.value))
  File "/Users/tleeuwenburg/Development/pyjaco/pyjaco/compiler/javascript.py", line 138, in visit_AssignSimple
    if not (var in self._scope):
AttributeError: 'Compiler' object has no attribute '_scope'
make[1]: *** [ui.html] Error 1
make: *** [all] Error 2

Tennessee Leeuwenburg

unread,
Oct 1, 2012, 10:22:55 PM10/1/12
to pyj...@googlegroups.com
I'm seeing the exact same issue on my FC17 box at work.

Christian Iversen

unread,
Oct 2, 2012, 3:46:35 AM10/2/12
to pyj...@googlegroups.com
On 2012-10-02 04:22, Tennessee Leeuwenburg wrote:
> I'm seeing the exact same issue on my FC17 box at work.

Which branch are you using?

--
Med venlig hilsen
Christian Iversen

Dexter

unread,
Oct 2, 2012, 3:49:39 AM10/2/12
to pyj...@googlegroups.com
Its been a while since i've been in that code. But didn't _scope have something to do with modules... 



--
You are subscribed to the Google Group pyj...@googlegroups.com
To unsubscribe from this group, send email to
pyjaco+unsubscribe@googlegroups.com

Christian Iversen

unread,
Oct 2, 2012, 4:07:03 AM10/2/12
to pyj...@googlegroups.com
On 2012-10-02 09:49, Dexter wrote:
> Its been a while since i've been in that code. But didn't _scope have
> something to do with modules...

Yeah I thought so. Maybe something went bad with the merge. But I just
tried to make master here, and that works. And I have nothing that is
not pushed or pulled from github.

It's weird, but maybe it's a platform bug. Gordon, do you have any ideas?

Dexter

unread,
Oct 2, 2012, 4:57:03 AM10/2/12
to pyj...@googlegroups.com
I'd say it isnt a platform bug. Appearantly the scope attribute isn't always set. It can either be a wrong branch/repository. 

What did you do to pull the code?

Dexter

unread,
Oct 2, 2012, 4:58:19 AM10/2/12
to pyj...@googlegroups.com
Btw.. any chance you're dutch? Leeuwenburg is a dutch name.. Tennessee isnt though. Maybe dutch roots :)

Greets

Dexter

unread,
Oct 2, 2012, 4:58:59 AM10/2/12
to pyj...@googlegroups.com
Haha, just looking at your profile tag: 'Australian Bureau of Meteorology'

Tennessee Leeuwenburg

unread,
Oct 2, 2012, 6:45:40 AM10/2/12
to pyj...@googlegroups.com
It's the devel branch. I only appear to have the devel branch.

(py)skaro-2:pyjaco tleeuwenburg$ git status
# On branch devel
nothing to commit (working directory clean)
(py)skaro-2:pyjaco tleeuwenburg$ git branch
* devel

I cloned the branch with git clone
https://github.com/chrivers/pyjaco.git, so I assumed the intention was
for people to get the devel branch by default?

I'll try to get a checkout of master and see how it goes. It's not a
platform issue -- or if so it is shared on FC17 at work :).

The name is dutch, but via South Africa (but from Holland rather than
Afrikaans). My folks emigrated here just before I was born. I've been
at BoM for several years now. I don't do much web stuff, but I do a
lot of Python, and I thought I'd see if I could avoid having to learn
too much JS by using this instead :P

Cheers,
-T
>>>> pyjaco+un...@googlegroups.com
>>>
>>>
>>
>
> --
> You are subscribed to the Google Group pyj...@googlegroups.com
> To unsubscribe from this group, send email to
> pyjaco+un...@googlegroups.com



--
--------------------------------------------------
Tennessee Leeuwenburg
http://myownhat.blogspot.com/
"Don't believe everything you think"

Tennessee Leeuwenburg

unread,
Oct 2, 2012, 6:54:30 AM10/2/12
to pyj...@googlegroups.com
The master branch makes fine. It took some doing to get though --
maybe my own limitations with how to use git. I had to download master
as a tarball via the web ui by manually hacking the URL! I don't
understand why I didn't get all the branches when I did the original
git clone, either. Oh well, I have something to start with now. It's
possible that gitlab has "devel" inappropriately set as the default
branch however.

Cheers,
-T

Christian Iversen

unread,
Oct 2, 2012, 7:08:43 AM10/2/12
to pyj...@googlegroups.com
On 2012-10-02 12:54, Tennessee Leeuwenburg wrote:
> The master branch makes fine. It took some doing to get though --
> maybe my own limitations with how to use git. I had to download master
> as a tarball via the web ui by manually hacking the URL! I don't
> understand why I didn't get all the branches when I did the original
> git clone, either. Oh well, I have something to start with now. It's
> possible that gitlab has "devel" inappropriately set as the default
> branch however.

Oops, indeed it was! Now "master" is the default branch! Thanks for
confirming that this solves it :)

Samuel Ytterbrink

unread,
Oct 2, 2012, 11:39:42 AM10/2/12
to pyj...@googlegroups.com
welcome on board Tennessee Leeuwenburg.

Your contributions have so fare bean more then mine in a year ;).

1+ to you!

2012/10/2 Christian Iversen <chri...@iversen-net.dk>
--
You are subscribed to the Google Group pyj...@googlegroups.com
To unsubscribe from this group, send email to



--
//Samuel Ytterbrink

g

unread,
Oct 2, 2012, 2:08:09 PM10/2/12
to pyj...@googlegroups.com, chri...@iversen-net.dk

It's weird, but maybe it's a platform bug. Gordon, do you have any ideas?



It appears that the issue was solved before I could help investigate... however:

I think we should update the README to show command lines to pull a new repo and to clean and run the test runner from python in a virtualenv.  

The test results along with output from _version.py would be very helpful in tracking down issues.

I need to spend an afternoon and document the changes/features my patches introduced.  I just haven't had any free time lately.

g

unread,
Oct 2, 2012, 2:13:59 PM10/2/12
to pyj...@googlegroups.com
On Tuesday, October 2, 2012 4:57:04 AM UTC-4, Dexter wrote:
I'd say it isnt a platform bug. Appearantly the scope attribute isn't always set. It can either be a wrong branch/repository. 

What did you do to pull the code?



_scope is set in the BaseCompiler __init__ method: https://github.com/chrivers/pyjaco/blob/master/pyjaco/compiler/__init__.py#L89 

It should always be set?  All of the compilers are subclasses of BaseCompiler.
Reply all
Reply to author
Forward
0 new messages