nrosenstein-c4d / c4ddev

C4D Plugin Development Tools
https://nrosenstein-c4d.github.io/c4ddev/
Other
35 stars 6 forks source link

Missing 'import os' on scripting_server.py, class SourceObject #19

Closed AlbertAlomar closed 6 years ago

AlbertAlomar commented 6 years ago

Hi Niklas,

Thank you creating and sharing this project.

I was getting this error:

C4DDev API EXtensions installed.
Copyright (c) 2015  Niklas Rosenstein
Binding C4DDev Scripting Server to localhost:2900 ...
C4DDev Scripting Server: running
Traceback (most recent call last):
  File "C:\Program Files\MAXON\Cinema 4D R18 Demo\plugins\c4ddev\plugins\scripting_server.py", line 367, in CoreMessage
    source.execute(scope)
  File "C:\Program Files\MAXON\Cinema 4D R18 Demo\plugins\c4ddev\plugins\scripting_server.py", line 144, in execute
    dirname = os.path.dirname(self.filename)
NameError: name 'os' is not defined

The 'os' module needs to be appended here (line 119, file scripting_server.py): import sys, codecs, socket, hashlib, threading

After adding it and restarting C4D all works ok.

NiklasRosenstein commented 6 years ago

Hi @Recubo, thanks for finding this issue. You are welcome to submit a PR. Let me know if you create one, otherwise I'll fix it myself next week.

AlbertAlomar commented 6 years ago

Hi @NiklasRosenstein (yes, I'm Recubo, I've just changed my profile name). I didn't want to interfere with your development branch, so I tried to push a new branch called' fixissue#19' and then create the Pull Request to Master, but I keep getting this error: Push failed: Failed with error: unable to access 'https://github.com/NiklasRosenstein/c4ddev.git/': The requested URL returned error: 403 Is it possible that you could have some github setting preventing external pushes?

NiklasRosenstein commented 6 years ago

Yes, you need to fork the repository first, then push that branch to your fork, then create a Pull Request for that branch from your repository to be merged into my repository. :)

AlbertAlomar commented 6 years ago

Thanks for the tip, Niklas. I'm a newbie in this kind of public open source collaboration.